簡體   English   中英

將Android Studio升級到2.1.2,現在出現構建錯誤

[英]Upgrade Android Studio to 2.1.2 and now getting build errors

我的項目之前運行良好,但是現在升級到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后,出現錯誤:

在此處輸入圖片說明

發生這種情況是因為不存在Build Tools版本19.1.0。

最新版本是23.0.3.

這些工具包含在SDK軟件包中,並安裝在<sdk>/build-tools/目錄中。

更改您的build.gradle

android {
   buildToolsVersion "23.0.3"
   // ...

}

SDK Build Tools發行說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM