配置项目':CordovaLib时发生问题

时间:2018-11-27 11:45:33

标签: node.js cordova ionic-framework

当我尝试使用

进行编译时

ionic cordova build --release android

我收到以下错误消息...可能是原因..

BUILD FAILED in 0s
cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

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

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
[ERROR] An error occurred while running subprocess cordova.

        cordova build android --release exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

2 个答案:

答案 0 :(得分:2)

这取决于您使用的是哪个版本的Android NDK。在NDK r17中已停止了MIPS和MIPS64 abis的支持(请参见Android NDK official documentation)。这是因为基于MIPS的Android设备已完全过时。您需要使用NDK r16或更早版本才能工作。您可以下载较旧的NDK版本here。根据建议here,Alternativeley可以从R18 ndk-bundle / toolchains中的NDK r17(或更旧版本)复制相应的目录。 r17中的目录实际上是空的,有一点提示说这些目录是为了兼容性而保留的。这是我所做的最后一个选择,对我有用。

答案 1 :(得分:0)

这是NDK捆绑包中缺少NDK工具链文件的问题,要解决此问题,请确保正确安装了NDK捆绑包,即使您无法尝试从外部下载并放在正确的路径中,也是如此。

如果您不为应用程序使用NDK工具,则可以删除整个NDk文件夹,它会正常工作,并带有一条警告消息,提示您缺少NDK工具文件