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

Compile Error #1

Closed rajibulanam closed 9 months ago

rajibulanam commented 1 year ago

Hi, I run your project and facing this error.

Task :app:configureCMakeDebug[arm64-v8a] C/C++: CMake Warning at F:/ANDROID_SDK/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message): C/C++: An old version of CMake is being used that cannot automatically detect C/C++: compiler attributes. Compiler identification is being bypassed. Some C/C++: values may be wrong or missing. Update to CMake 3.19 or newer to use C/C++: CMake's built-in compiler identification.
C/C++: Call Stack (most recent call first): C/C++: F:/ANDROID_SDK/ndk/23.1.7779620/build/cmake/android.toolchain.cmake:55 (include) C/C++: F:/react-native-scanner-main_2/react-native-scanner-main/example/android/app/.cxx/Debug/2w4f733n/arm64-v8a/CMakeFiles/3.18.1-g262b901-dirty/CMakeSystem.cmake:6 (include) C/C++: CMakeLists.txt:28 (project) C/C++: CMake Warning in F:/react-native-scanner-main_2/react-native-scanner-main/example/node_modules/@pushpendersingh/react-native-scanner/android/build/generated/source/codegen/jni/CMakeLists.txt: C/C++: The object file directory C/C++: F:/react-native-scanner-main_2/react-native-scanner-main/example/android/app/.cxx/Debug/2w4f733n/arm64-v8a/RNReactNativeScannerViewSpec_autolinked_build/CMakeFiles/react_codegen_RNReactNativeScannerViewSpec.dir/./C/C++: has 213 characters. The maximum full path to an object file is 250 C/C++: characters (see CMAKE_OBJECT_PATH_MAX). Object file C/C++: react/renderer/components/RNReactNativeScannerViewSpec/States.cpp.o C/C++: cannot be safely placed under this directory.
The build may not work C/C++: correctly.

Task :app:buildCMakeDebug[arm64-v8a] FAILED C/C++: ninja: error: mkdir(RNReactNativeScannerViewSpec_autolinked_build/CMakeFiles/react_codegen_RNReactNativeScannerViewSpec.dir/react/renderer/components/RNReactNativeScannerViewSpec): No such file or directory 67 actionable tasks: 10 executed, 57 up-to-date

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

2: Task failed with an exception.

BUILD FAILED in 1m 15s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

2: Task failed with an exception.

BUILD FAILED in 1m 15s

at makeError (F:\react-native-scanner-main_2\react-native-scanner-main\example\node_modules\execa\index.js:174:9)
at F:\react-native-scanner-main_2\react-native-scanner-main\example\node_modules\execa\index.js:278:16      
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (F:\react-native-scanner-main_2\react-native-scanner-main\example\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:82:7)
at async Command.handleAction (F:\react-native-scanner-main_2\react-native-scanner-main\example\node_modules\@react-native-community\cli\build\index.js:108:9)      

info Run CLI with --verbose flag for more details.
PS F:\react-native-scanner-main_2\react-native-scanner-main\example>

pushpender-singh-ap commented 1 year ago

Can you share me the which command do you use to run this project & which operating system are you using?

rajibulanam commented 1 year ago

I use Windows 10 64 bit OS To Run project use npm install ... npm start npm run android

pushpender-singh-ap commented 9 months ago

'@pushpendersingh/react-native-scanner' library does not currently support the Windows environment.