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 error: Unresolved reference: ReactNativeScannerViewManagerInterface #3

Closed mlowijs closed 1 year ago

mlowijs commented 1 year ago

Hi,

I'm trying to use your package with a RN 0.71 application, and the following Android build error pops up:

> Task :pushpendersingh_react-native-scanner:compileDebugKotlin FAILED
224 actionable tasks: 40 executed, 184 up-to-date
Note: /home/michiel/Code/tlr-app/node_modules/react-native-permissions/android/src/main/java/com/zoontek/rnpermissions/RNPermissionsPackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
e: /home/michiel/Code/tlr-app/node_modules/@pushpendersingh/react-native-scanner/android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerViewManager.kt: (9, 40): Unresolved reference: ReactNativeScannerViewManagerInterface
e: /home/michiel/Code/tlr-app/node_modules/@pushpendersingh/react-native-scanner/android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerViewManager.kt: (10, 40): Unresolved reference: ReactNativeScannerViewManagerDelegate
e: /home/michiel/Code/tlr-app/node_modules/@pushpendersingh/react-native-scanner/android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerViewManager.kt: (14, 48): Unresolved reference: ReactNativeScannerViewManagerInterface
e: /home/michiel/Code/tlr-app/node_modules/@pushpendersingh/react-native-scanner/android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerViewManager.kt: (19, 17): Unresolved reference: ReactNativeScannerViewManagerDelegate

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':pushpendersingh_react-native-scanner:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 57s
pushpender-singh-ap commented 1 year ago

@mlowijs Hi, can you share the example repository and please run below command and share the output

react-native info
pushpender-singh-ap commented 1 year ago

@mlowijs Hi, This library required new architecture enabled, i think you are not enabled that why you getting this error. Please enabled the newArchEnabled=true in gradle.properties file