React Native官方案例运行遇到 ndk-build.cmd'' finished with non-zero exit value 2

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ReactAndroid:buildReactNdkLib'.
> Process 'command 'D:\ProgramFile\Android\android-ndk-r14b\ndk-build.cmd'' 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

错误原因:

运行React Native官方案例需要配置sdk和ndk环境变量,而且NDK必须是10e ,不然会引起版本冲突

解决方案:

下载NDK 10e:https://developer.android.google.cn/ndk/downloads/older_releases

配置ndk的环境变量即可;

猜你喜欢

转载自blog.csdn.net/niuba123456/article/details/82010337