react-native-scanner icon indicating copy to clipboard operation
react-native-scanner copied to clipboard

Build failing on android

Open mak12 opened this issue 1 year ago • 1 comments
trafficstars

Current behaviour

After installing this library build is failing on android /Users/kawee/Desktop/work/insol/InsolClientApp/android/app/build/generated/assets/createBundleStagingDebugJsAndAssets/index.android.bundle:162057:65: warning: the variable "Character" was not declared in function "allNumberGroupsRemainGrouped" ...rRegion(region, true) != null && Character.isDigit(normalizedCandidate.cha... ^~~~~~~~~ e: file:///Users/kawee/Desktop/work/insol/InsolClientApp/node_modules/@pushpendersingh/react-native-scanner/android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerViewManager.kt:9:40 Unresolved reference: ReactNativeScannerViewManagerInterface e: file:///Users/kawee/Desktop/work/insol/InsolClientApp/node_modules/@pushpendersingh/react-native-scanner/android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerViewManager.kt:10:40 Unresolved reference: ReactNativeScannerViewManagerDelegate e: file:///Users/kawee/Desktop/work/insol/InsolClientApp/node_modules/@pushpendersingh/react-native-scanner/android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerViewManager.kt:14:48 Unresolved reference: ReactNativeScannerViewManagerInterface e: file:///Users/kawee/Desktop/work/insol/InsolClientApp/node_modules/@pushpendersingh/react-native-scanner/android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerViewManager.kt:19:17 Unresolved reference: ReactNativeScannerViewManagerDelegate e: file:///Users/kawee/Desktop/work/insol/InsolClientApp/node_modules/@pushpendersingh/react-native-scanner/android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerViewManager.kt:30:3 'enableFlashlight' overrides nothing e: file:///Users/kawee/Desktop/work/insol/InsolClientApp/node_modules/@pushpendersingh/react-native-scanner/android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerViewManager.kt:34:3 'disableFlashlight' overrides nothing e: file:///Users/kawee/Desktop/work/insol/InsolClientApp/node_modules/@pushpendersingh/react-native-scanner/android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerViewManager.kt:38:3 'releaseCamera' overrides nothing FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':pushpendersingh_react-native-scanner:compileDebugKotlin'.

Expected behaviour

How to reproduce?

  • Install library
  • run using react-native run-android

What have you tried so far?

Your Environment

buildToolsVersion = "34.0.0" minSdkVersion = 21 compileSdkVersion = 34 targetSdkVersion = 34

software version
ios x
android x
react-native 0.73.5
@pushpendersingh/react-native-scanner x.x.x
node x.x.x
npm or yarn x.x.x

mak12 avatar Jul 24 '24 13:07 mak12

Hi @mak12, can you please let me know are you using Mac Machine or Window Machine?

pushpender-singh-ap avatar Jul 24 '24 20:07 pushpender-singh-ap

Hi @mak12, can you please let me know are you using Mac Machine or Window Machine?

Hi @pushpender-singh-ap , I have the same problem as mentioned here, in my case I use a Mac to develop.

image

System: OS: macOS 14.6.1 CPU: (10) arm64 Apple M2 Pro Memory: 55.83 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.5.0 path: /usr/local/bin/node Yarn: version: 4.1.1 path: /opt/homebrew/bin/yarn npm: version: 10.2.3 path: ~/.nvm/versions/node/v20.10.0/bin/npm Watchman: version: 2024.06.10.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.13.0 path: /usr/local/bin/pod

React Native Version: 0.73.9

oularrea avatar Sep 14 '24 22:09 oularrea

Using mac here aswell.

mak12 avatar Sep 15 '24 08:09 mak12

@oularrea @mak12 are you using the new architecture? in you project

pushpender-singh-ap avatar Sep 15 '24 10:09 pushpender-singh-ap

@pushpender-singh-ap no, I not use new architecture

oularrea avatar Sep 15 '24 10:09 oularrea

@oularrea this is why you are facing this issue this library only for new architecture.

pushpender-singh-ap avatar Sep 15 '24 10:09 pushpender-singh-ap

If you wanna use new architecture please read the readme and follow the step for using this library.

pushpender-singh-ap avatar Sep 15 '24 10:09 pushpender-singh-ap

@pushpender-singh-ap
Then you should also specify in the readme if it is so important which version of React Native this library works for.

since this is not clear and brings a lot of confusion

oularrea avatar Sep 15 '24 10:09 oularrea

@oularrea this library work 0.70+ react native version i don't test this on latest version but pretty sure it's work well.

pushpender-singh-ap avatar Sep 15 '24 10:09 pushpender-singh-ap

@mak12 , I confirm that I have updated to the latest version 0.75.3 of RN and enabled the new architecture and it worked.

@pushpender-singh-ap It's about giving better feedback to the community, not being so arrogant with the answers.

oularrea avatar Sep 15 '24 11:09 oularrea

@oularrea Thank you for your input. I'll keep that in mind and aim for clearer, more respectful communication moving forward. Let's work together to create a better environment for everyone.

pushpender-singh-ap avatar Sep 15 '24 11:09 pushpender-singh-ap