gpt4 book ai didi

android - 错误 :The project is using an unsupported version of the Android Gradle plug-in (0. 12.2)

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:43:22 25 4
gpt4 key购买 nike

更新 Android Studio 后我无法运行我的应用程序 - 我收到此异常:

Error:The project is using an unsupported version of the Android Gradle plug-in (0.12.2). The recommended version is 1.0.0-rc4.

这是我的 buld.gradle 依赖项

dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}

更新 我在 build.gradle 中进行了更改,现在出现此错误:

Error:(42, 0) Gradle DSL method not found: 'runProguard()'
Possible causes: The project 'drivernotes-android' may be using a version of Gradle that does not contain the method.
Gradle settings The build file may be missing a Gradle plugin.
Apply Gradle plugin

更新 2这是我的 build.gradle( fragment ):

buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0-rc4'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}
apply plugin: 'android'
apply plugin: 'crashlytics'

repositories {
maven { url 'http://download.crashlytics.com/maven' }
}


android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
}

packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}



buildTypes {
release {
minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
signingConfigs {
}

最佳答案

使用这个版本的gradle插件

classpath 'com.android.tools.build:gradle:1.0.0-rc4'

有关 gradle 插件和 android studio 兼容性的更多信息,请参阅 this

编辑

到目前为止,android studio 和 gradle 插件都是稳定的,因此使用这个

classpath 'com.android.tools.build:gradle:1.0.0'

关于android - 错误 :The project is using an unsupported version of the Android Gradle plug-in (0. 12.2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27353974/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com