react-native-tesseract-ocr icon indicating copy to clipboard operation
react-native-tesseract-ocr copied to clipboard

compile with React Native 0.68.1 2 pbs

Open Productivix opened this issue 2 years ago • 4 comments

thanks for the code and integration. Describe the bug

I installed the packages in a fresh 0.681 RN app. yarn react-native run-android gives me 2 failures :

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • Where: Build file 'C:\Users\info\Documents\logiciels-windows\dev_RN-Node-GIT\test_rn_vision\node_modules\react-native-tesseract-ocr\android\build.gradle' line: 23

  • What went wrong: A problem occurred evaluating project ':react-native-tesseract-ocr'.

Plugin with id 'maven' not found.

2: Task failed with an exception.

  • What went wrong: A problem occurred configuring project ':react-native-tesseract-ocr'.

compileSdkVersion is not specified. Please add it to build.gradle

Dependencies (please complete the following information): "react": "17.0.2", "react-native": "0.68.1",

  • react-native-tesseract-ocr: 2.0.3

To Reproduce Steps to reproduce the behavior:

  1. installed the packages in a fresh 0.681 RN app. yarn add ...
  2. yarn react-native run-android
  3. see errors (up)

Expected behavior a build

Smartphone (please complete the following information):

  • Device: Android
  • OS: 8.1, and 10]

Additional context

Thank you , regards William

Productivix avatar Apr 22 '22 09:04 Productivix

@Productivix , did you fork and updated project from react 0.62.2 to 0.68.1? I ask it cause when you install this package you should get error saying that you react version is higher. I forked this project and updated it from react native 62 to 64. I am running on iOS and getting error. Can you check on iOS ? Do you have the same error?

yestay90 avatar Apr 25 '22 09:04 yestay90

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 07 '22 03:07 stale[bot]

hi @yestay90 , sorry I did not see your answer - What do you mean as solution exactly ? I installed a fresh RN and then the module . Do you mean that install a version of RN adapted to the module and then upgrade ?

Productivix avatar Jul 07 '22 04:07 Productivix

ok : test :

  • install fresh RN 0.61.5 , add this repo : no problem
  • yarn run android : no problem
  • only in the metro at screen an error unexpected token : expected a ')' or a ";" after parameter declaration I never learned that old version script , so I put in my app.json : ''' import React, {useState} from 'react'; import {SafeAreaView, Text} from 'react-native';

import TesseractOcr, {LANG_ENGLISH} from 'react-native-tesseract-ocr'; import {useEventListener} from 'react-native-tesseract-ocr';

const tessOptions = {}; TesseractOcr.recognize(imageSource, LANG_ENGLISH, tessOptions);

const App = () => { const [progress, setProgress] = useState(0); useEventListener('onProgressChange', p => { setProgress(p.percent / 100); }); return ( <SafeAreaView> <Text>hello test ocr</Text> </SafeAreaView> ); };

export default App; ''' so now , upgrade of the whole to 0.69.1 ...? https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.69.1 : a lot of manual work !!

Productivix avatar Jul 07 '22 09:07 Productivix

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 20 '22 17:09 stale[bot]