Android Studio 3.2.1解决错误信息"No toolchains found in the NDK toolchains folder for ABI w...

栏目: IOS · Android · 发布时间: 7年前

内容简介:在用这个错误信息的原因是从不过这个提示很能迷惑人,会让人误以为自己的

在用 Android Studio 3.2.1 导入以前的项目,进行编译的时候,报告如下错误信息:

FAILURE: Build failed with an exception.
 
* What went wrong:
A problem occurred configuring project ':app'.
> 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. Run with --scan to get full insights.
 
* Get more help at https://help.gradle.org
 
CONFIGURE FAILED in 5s
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

这个错误信息的原因是从 NDK r17 版本开始,已经不支持 "armeabi、mips、mips64" 这三种 ABI 格式了,而当前机器上安装的 NDK 版本是 NDK r17 之后的版本。

不过这个提示很能迷惑人,会让人误以为自己的 build.gradle 中配置了 MIPS 的 ABI 。实际上根本没有配置,是低版本的构建 工具 自己在默认构建 MIPS 格式,而又找不到对应的工具链。

解决方法很简单,要么使用低于 NDK r17 的 NDK 版本,要么修改主工程的 build.gradle ,找到如下

// Top-level build file where you can add configuration options common to all sub-projects/modules.
configure(allprojects) {
    buildscript {
        repositories {
		    google()
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.0.0'
        }
    }
 
    repositories {
          jcenter()
    }
}

将其中的

classpath 'com.android.tools.build:gradle:3.0.0'

修改成

classpath 'com.android.tools.build:gradle:3.2.1'

高版本的构建工具,才能适配高版本的 NDK 。

参考链接


以上所述就是小编给大家介绍的《Android Studio 3.2.1解决错误信息"No toolchains found in the NDK toolchains folder for ABI w...》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。

High Performance Python

High Performance Python

Andrew Lewis / O'Reilly Media, Inc. / 2010-09-15 / USD 34.99

Chapter 1. Introduction Section 1.1. The High Performance Buzz-word Chapter 2. The Theory of Computation Section 2.1. Introduction Section 2.2. Problems Section 2.3. Models of Computati......一起来看看 《High Performance Python》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具