react-native-community / RNNewArchitectureApp

A collection of sample React Native Apps that will show you how to use the New Architecture (Fabric & TurboModules) step-by-step.
MIT License
201 stars 28 forks source link

Can't pass gradle build on Windows #3

Closed zxcvbnm3057 closed 2 years ago

zxcvbnm3057 commented 2 years ago

I am using branch android-0.68.0-rc3 and modify react-native version to 0.68 stable only. When I try yarn run android, it return an error log like this.

Task :ReactAndroid:buildNdkBuildDebug C/C++: make: Deleting file 'C:\Users\Fengying\Desktop\RNNewArchitectureApp-run-android-0.68.0-rc3\node_modules\react-native\ReactAndroid\build\intermediates\cxx\Debug\3o3l4z5f/obj/local/armeabi-v7a/libboost.a' C/C++: C:/Users/Fengying/AppData/Local/Android/Sdk/ndk/21.4.7075529/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ar: C:\Users\Fengying\Desktop\RNNewArchitectureApp-run-android-0.68.0-rc3\nodemodules\react-native\ReactAndroid\build\intermediates\cxx\Debug\3o3l4z5f/obj/local/armeabi-v7a/objs-debug/boost/C/Users/Fengying/Desktop/RNNewArchitectureApp-run-android-0.68.0-rc3/node_modules/react-native/ReactAndroid/build/third-party-ndk/boost/asm/arm/ontop_arm_aapcs_elf_gas.o: No such file or directory C/C++: make: [C:/Users/Fengying/AppData/Local/Android/Sdk/ndk/21.4.7075529/build//../build/core/build-binary.mk:600: C:\Users\Fengying\Desktop\RNNewArchitectureApp-run-android-0.68.0-rc3\node_modules\react-native\ReactAndroid\build\intermediates\cxx\Debug\3o3l4z5f/obj/local/armeabi-v7a/libboost.a] Error 1 C/C++: make: *** Waiting for unfinished jobs....

Task :ReactAndroid:buildNdkBuildDebug FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings 25 actionable tasks: 15 executed, 10 up-to-date

FAILURE: Build failed with an exception.

BUILD FAILED in 4m 54s

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 failed with an exception.

BUILD FAILED in 4m 54s

at makeError (C:\Users\Fengying\Desktop\RNNewArchitectureApp-run-android-0.68.0-rc3\node_modules\execa\index.js:174:9)
at C:\Users\Fengying\Desktop\RNNewArchitectureApp-run-android-0.68.0-rc3\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\Fengying\Desktop\RNNewArchitectureApp-run-android-0.68.0-rc3\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\Fengying\Desktop\RNNewArchitectureApp-run-android-0.68.0-rc3\node_modules\@react-native-community\cli\build\index.js:192:9)

info Run CLI with --verbose flag for more details. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

zxcvbnm3057 commented 2 years ago

Any help?

kelset commented 2 years ago

the issue has already been reported here https://github.com/facebook/react-native/issues/33528 so I'm not sure this repo is the right place to report.

zxcvbnm3057 commented 2 years ago

Yeah, sorry for that. I report it duplicate cause dont know how to solve it.