我正在尝试将 Dexguard 添加到 Android Studio。我遵循了指导方针,所以我的 build.gradle 如下:
buildscript {
repositories {
mavenCentral()
flatDir { dirs '/Users/XXXX/Desktop/DexGuard5.3.00/lib' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.4'
classpath ':dexguard:'
}
}
apply plugin: 'dexguard'
android {
compileSdkVersion 19
buildToolsVersion "19.0.3"
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
proguardFile plugin.getDefaultDexGuardFile('dexguard-debug.pro')
proguardFile 'dexguard-project.txt'
proguardFile 'proguard-project.txt'
}
release {
proguardFile plugin.getDefaultDexGuardFile('dexguard-release.pro')
proguardFile 'dexguard-project.txt'
proguardFile 'proguard-project.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:19.0.1'
compile 'com.android.support:appcompat-v7:19.0.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
然后我尝试构建项目,我收到以下错误:
错误:配置项目“:XXXX”时出现问题。没有这样的属性:类的baseName:com.android.build.gradle.internal.variant.ApplicationVariantData
有没有人再次遇到这样的问题?
先感谢您!