This question already has an answer here:
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location
(1个答案)
4年前关闭。
在sdk更新并将我的库放在gradle-file中之后,AS为我提供了将gradle版本从2.0.0-aplha6更改为稳定的2.1.2。这是项目gradle:
清理/重建/运行项目后,出现错误:
因此,上次我使用
(1个答案)
4年前关闭。
在sdk更新并将我的库放在gradle-file中之后,AS为我提供了将gradle版本从2.0.0-aplha6更改为稳定的2.1.2。这是项目gradle:
// 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'
修复了此错误,但现在我无法做到这一点。我该如何解决这个问题?请帮忙! 最佳答案
这是解决方案
要删除警告,请删除所有Android SDK Build Tools19.x。之后,它仅应显示Android SDK Buld Tools 19.1。重新安装该版本,您应该一切顺利。
Link