Android Studio错误:无法找到构建工具修订版24.0.0 rc4

时间:2016-06-14 21:34:52

标签: android android-studio build git-clone

我从github克隆了一个项目,我在Build中遇到以下错误:Failed to find Build Tools revision 24.0.0 rc4。这是build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '24.0.0 rc4'

defaultConfig {
    applicationId "com.project02.projects"
    minSdkVersion 16
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.android.gms:play-services:9.0.1'
compile 'com.google.android.gms:play-services-ads:9.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1'
compile 'com.android.support:support-v4:23.4.0'
}

我有In File-> Project Structere - >构建工具修订版 - > 24.0.0 rc4。在SDK目录中,该文件夹是24.0.0-rc4。

我尝试更改为23.0.2,但是在运行时我得到了这个错误:**错误:.dex文件中的方法引用数不能超过64K。 了解如何解决此问题

https://developer.android.com/tools/building/multidex.html **和

错误:任务执行失败':app:transformClassesWithDexForDebug'。> com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException:java.lang.UnsupportedOperationException

2 个答案:

答案 0 :(得分:1)

您获得的错误是因为您使用内置工具文件夹中不存在的新工具覆盖了以前构建的工具。

确保从SDK管理器下载预期构建的工具,然后适当地配置gradle文件。检查并查看是否有效。

答案 1 :(得分:0)

它对我有用。 我跑#34; ./ gradlew build"在命令行和更改buildToolVersion" 24"。 在命令运行时,将安装SDK并且一切正常。

相关问题