更新sdk后出错

时间:2016-07-04 12:37:58

标签: android gradle android-sdk-2.3

在sdk更新并在gradle-file中提升我的库之后,AS让我将gradle版本从2.0.0-aplha6更改为稳定的2.1.2。这里的项目是:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        maven {
            url "https://jitpack.io"
            mavenCentral()
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2'
        classpath 'com.google.gms:google-services:3.0.0'
       // classpath 'com.android.tools.build:gradle:2.0.0-alpha6'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://jitpack.io"
        }
    }
}

清理/重建/运行项目后出现错误:

Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location 'C:\sdk\add-ons\addon-google_apis-google-19-1' (Expected 'C:\sdk\add-ons\addon-google_apis-google-19')
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.io.FileNotFoundException: C:\AndroidStudioProjects\labradoor\app\twitter4j-core-3.0.5.jar (Не удается найти указанный файл)

所以,上次我使用classpath 'com.android.tools.build:gradle:2.0.0-alpha6'修复了这个错误,但现在我无法做到。我该如何解决这个问题?请帮忙!

1 个答案:

答案 0 :(得分:1)

这是解决方案

要删除警告,请删除所有Android SDK Build Tools 19.x.它应该只显示Android SDK Buld Tools 19.1。安装该版本,你应该好好去。

Link