错误输出入如下:

[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 | Windows 64-bit | 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

沈阳招聘:PHP(初/高级)工程师

PHP(初/高级)工程师 地标 沈阳 特别说明 欢迎有北京工作经历,想回家乡发展的人才,目前已通过面试的,都有此背景。立足沈阳,对标北京一线互联网公司,并...

阅读全文

沈阳招聘:大前端H5(初/高级)工程师

大前端H5(初/高级)工程师 地标 沈阳 特别说明 欢迎有北京工作经历,想回家乡发展的人才,目前已通过面试的,都有此背景。立足沈阳,对标北京一线互联网公司...

阅读全文

微信小程序要求HTTPS,该如何选择SSL证书

首次部署HTTPS网站的同学对选择什么样的SSL证书多多少少都有点迷茫。 这里考虑的因素确实不少:是否支持多域名、泛域名,价格,信息泄露的保额,国内的厂商还...

阅读全文

1 条评论

欢迎留言