在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'
修复了这个错误,但现在我无法做到。我该如何解决这个问题?请帮忙!
答案 0 :(得分:1)