dexguard を私の android/gradle プロジェクトに統合しようとして少し問題があります。
- デックスガード: 5.5.32
- グラドル: 2.2.1
- グラドルプラグイン: 1.3.0
- buildToolsバージョン: 23.0.1
次のエラーが表示されますapply plugin: 'dexguard'
。
Error:Unable to load class 'com.android.builder.SdkParser'
編集:
ここに私のアプリのgradleファイルがあります:
buildscript {
repositories {
flatDir { dirs '/usr/local/DexGuard5.5.32/lib' }
jcenter()
}
dependencies {
classpath ':dexguard:'
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'dexguard' //This, when uncommented produces the error
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile files('libs/commons-collections4-4.0.jar')
compile files('libs/commons-codec-1.10.jar')
compile files('libs/gson-2.3.1.jar')
compile files('libs/jaxb2-maven-plugin:2.1.jar')
compile project(':sdk')
compile project(':zxing-lib')
}
android {
signingConfigs {
release {
//my signing config
}
}
compileSdkVersion 22
buildToolsVersion '23.0.1'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src/main/java', 'src/main/native', 'src/test/java']
resources.srcDirs = ['src/main/java', 'src/main/native', 'src/test/java']
aidl.srcDirs = ['src/main/java', 'src/main/native', 'src/test/java']
renderscript.srcDirs = ['src/main/java', 'src/main/native', 'src/test/java']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
buildTypes {
//The following should be uncommented when dexuard works!!!
// debug {
// proguardFile plugin.getDefaultDexGuardFile('dexguard-debug.pro')
// proguardFile 'dexguard-project.txt'
// proguardFile 'dexguard-project-debug.txt'
// proguardFile 'proguard-project.txt'
// }
// release {
// proguardFile plugin.getDefaultDexGuardFile('dexguard-release.pro')
// proguardFile 'dexguard-project.txt'
// proguardFile 'dexguard-project-release.txt'
// proguardFile 'proguard-project.txt'
// }
}
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}
}
defaultConfig {
targetSdkVersion 22
signingConfig signingConfigs.release
}
productFlavors {
app2 {
applicationId "some.app.id"
}
app {
applicationId "some.app.id2"
}
}
}
あなたの考えは何ですか??