【问题标题】:Gradle issue when upgrading from 0.14.0 to 1.0.0从 0.14.0 升级到 1.0.0 时的 Gradle 问题
【发布时间】:2015-02-13 09:30:59
【问题描述】:

我刚刚将我的 Android Studio 从 1.0 RC 2 升级到 1.0.1。

之后,系统提示我将 gradle 插件从 0.14.0 更新到 1.0.0。

一旦我这样做了,gradle build 就会因错误而失败 -

Error:No such property: GRADLE_SUPPORTED_VERSIONS for class: com.saikoa.dexguard.h

还有其他人遇到过类似的问题吗?非常感谢!

我的 build.gradle -

buildscript {
repositories {
    flatDir { dirs '../lib' } // For the DexGuard plugin.
    mavenCentral()               // For the Android plugin.

}
dependencies {
    classpath ':dexguard:'
    classpath 'com.android.tools.build:gradle:1.0.0'
}
}

apply plugin: 'dexguard'
android {
buildTypes {
    release {
        proguardFiles getDefaultDexGuardFile('dexguard-release.pro'),'dexguard-project.txt'
    }
    debug{
        //proguardFiles getDefaultDexGuardFile('dexguard-release.pro'),'dexguard-project.txt'
        proguardFiles getDefaultDexGuardFile('dexguard-debug.pro'),'dexguard-project.txt'
    }
}
}

【问题讨论】:

标签: android gradle dexguard


【解决方案1】:

对于 Android 插件 1.0.+,您应该确保您使用的是 DexGuard 插件 6.1.+。

然后您需要同时应用这两个插件:

apply plugin: 'com.android.application'
apply plugin: 'dexguard'

最后,Android 插件 1.0.0 需要 Gradle 2.2.1。

【讨论】:

    猜你喜欢
    • 2015-04-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-01
    • 2016-02-05
    • 2014-04-10
    • 1970-01-01
    相关资源
    最近更新 更多