React Native compile error: ReactAndroid:buildReactNdkLib FAILED

The error output is as follows:


[armeabi-v7a] Compile++      : reactnativejni <= Dummy.cpp
make: /Users/qisen/adt-bundle/android-ndk-r12b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
[armeabi-v7a] Compile++      : reactnativejnifb <= CatalystInstanceImpl.cpp
[armeabi-v7a] Compile++      : reactnativejnifb <= CxxModuleWrapper.cpp
make: *** [/Users/qisen/tmp/node/react-native/ReactAndroid/build/tmp/buildReactNdkLib/local/armeabi-v7a/objs/reactnativejni/Dummy.o] Error 1
make: *** Waiting for unfinished jobs....
make: /Users/qisen/adt-bundle/android-ndk-r12b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
make: /Users/qisen/adt-bundle/android-ndk-r12b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
make: *** [/Users/qisen/tmp/node/react-native/ReactAndroid/build/tmp/buildReactNdkLib/local/armeabi-v7a/objs/reactnativejnifb/CxxModuleWrapper.o] Error 1
make: *** [/Users/qisen/tmp/node/react-native/ReactAndroid/build/tmp/buildReactNdkLib/local/armeabi-v7a/objs/reactnativejnifb/CatalystInstanceImpl.o] Error 1
:ReactAndroid:buildReactNdkLib FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ReactAndroid:buildReactNdkLib'.
> Process 'command '/Users/qisen/adt-bundle/android-ndk-r12b/ndk-build'' finished with non-zero exit value 2

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

BUILD FAILED

Total time: 20.673 secs


The reason is that the NDK version is wrong, it must be gcc4.8, please select the Android NDK r10e corresponding system to download and install, and you need to bring your own ladder .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326370855&siteId=291194637