我的项目之前构建得很好,但现在升级到Android Studio 2.1.2时出现错误:
以下是我在build.gradle
文件中的内容:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'android'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "com.puc.mobile"
minSdkVersion 14
targetSdkVersion 19
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
//compile files('libs/crashlytics.jar')
compile files('libs/FLurry_3.2.2.jar')
compile files('libs/universal-image-loader-1.9.2.jar')
// You must install or update the Support Repository through the SDK manager to use this dependency.
// You must install or update the Google Repository through the SDK manager to use this dependency.
compile files('libs/commons-lang3-3.4.jar')
compile('com.crashlytics.sdk.android:crashlytics:2.5.7@aar') {
transitive = true;
}
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
compile files('libs/Parse-1.13.0.jar')
compile 'com.android.support:support-v4:19.0.0'
compile 'com.google.android.gms:play-services:9.2.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.google.android.gms:play-services-ads:9.2.0'
compile 'com.google.android.gms:play-services-auth:9.2.0'
compile 'com.google.android.gms:play-services-gcm:9.2.0'
}
我意识到构建工具版本存在一些问题,但说实话,我不确定如何修复它。有线索吗?
更新
如下所述更新buildToolsVersion
后,我收到错误:
答案 0 :(得分:0)
这是因为Build Tools修订版19.1.0不存在。
最新版本为23.0.3.
这些工具包含在SDK包中,并安装在<sdk>/build-tools/
目录中。
更改build.gradle
android {
buildToolsVersion "23.0.3"
// ...
}