React Native编译错误:ReactAndroid:buildReactNdkLib FAILED

前端之家收集整理的这篇文章主要介绍了React Native编译错误:ReactAndroid:buildReactNdkLib FAILED前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

错误输出入如下:

[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

原因为NDK 版本不对,必须gcc4.8,请选择 Android NDK r10e 对应系统下载安装,需要自备梯子。

Android NDK r12b

Windows 32-bit | Windows 64-bit | Mac OS X 64-bit | Linux 64-bit

Android NDK r11c

Windows 32-bit | Windows 64-bit | Mac OS X 64-bit | Linux 64-bit

Android NDK r10e

Windows 32-bit | Windows 64-bit | Mac OS X 64-bit | Linux 64-bit

Android NDK r9d

Windows 32-bit | @L_301_13@ | Mac OS X 64-bit | Linux 64-bit

Android NDK r8e

Windows 32-bit | Windows 64-bit | Mac OS X 64-bit | Linux 64-bit

Android NDK r7c

Windows 32-bit | Mac OS X 64-bit | Linux 64-bit

原文链接:https://www.f2er.com/react/305212.html

猜你在找的React相关文章