pushpender-singh-ap / react-native-scanner

A QR code & Barcode Scanner for React Native Projects. It supports React Native's new Fabric Native architecture and was created in Kotlin and Objective-C.
https://www.npmjs.com/package/@pushpendersingh/react-native-scanner
MIT License
54 stars 10 forks source link

Build failing on android #26

Closed mak12 closed 1 month ago

mak12 commented 3 months ago

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?

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
pushpender-singh-ap commented 3 months ago

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

oularrea commented 1 month ago

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

mak12 commented 1 month ago

Using mac here aswell.

pushpender-singh-ap commented 1 month ago

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

oularrea commented 1 month ago

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

pushpender-singh-ap commented 1 month ago

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

pushpender-singh-ap commented 1 month ago

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

oularrea commented 1 month ago

@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

pushpender-singh-ap commented 1 month ago

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

oularrea commented 1 month ago

@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.

pushpender-singh-ap commented 1 month ago

@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.