Когда я пытаюсь использовать плагин dexguard
вместо android
плагина (dexguard
плагина расширяет android
), мой gradle build process
терпит неудачу с этой ошибкой:Dexguard против плагин Android - брейки процесса сборки
$ ./gradlew assembleDebug
FAILURE: Build failed with an exception.
* Where:
Build file '/projectRoot/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':projectRoot:app'.
Could not create plugin of type 'g'.
Первой линией build.gradle для моего приложения модуль
apply plugin: 'dexguard'
build.gradle для всего моего проекта
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
flatDir { dirs 'path-to-dexguard/lib' }
mavenCentral()
}
dependencies {
classpath ':dexguard:'
classpath 'com.android.tools.build:gradle:0.12.+'
}
}
Я побежал вариант gradlew
с debug
включен
$ ./gradlew --debug assembleDebug
[ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NoClassDefFoundError: com/android/builder/DefaultBuildType
[ERROR] [org.gradle.BuildExceptionReporter] at com.saikoa.dexguard.g.$getStaticMetaClass(DexGuard)
[ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.BasePlugin.<init>(BasePlugin.groovy:2173)
[ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.AppPlugin.<init>(AppPlugin.groovy:37)
[ERROR] [org.gradle.BuildExceptionReporter] at com.saikoa.dexguard.g.<init>(DexGuard:90)
[ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:62)
[ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginRegistry.loadPlugin(DefaultPluginRegistry.java:65)
[ERROR] [org.gradle.BuildExceptionReporter] ... 46 more
[ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.ClassNotFoundException: com.android.builder.DefaultBuildType
[ERROR] [org.gradle.BuildExceptionReporter] ... 52 more
Моя gradle
версия 2,1
$ gradle -v
------------------------------------------------------------
Gradle 2.1
------------------------------------------------------------
Build time: 2014-09-08 10:40:39 UTC
Build number: none
Revision: e6cf70745ac11fa943e19294d19a2c527a669a53
Groovy: 2.3.6
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.7.0_07 (Oracle Corporation 23.3-b01)
OS: Mac OS X 10.9.5 x86_64
Если я использую андроид вместо dexguard, то у меня нет проблем.
Любые помощь или указатели приветствуются. Заранее спасибо.
PS: У меня нет проблем с запуском ANT
самостоятельно - fwiw.
Спасибо. Я могу построить его сейчас Эрик. Но файл apk, который я получил, теперь отказывается установить с ошибкой: INSTALL_FAILED_UID_CHANGED. Как плагин Dexguard отличается от Android, что результирующий apk отказывается устанавливать? Есть идеи? Благодарю. –
эй, у меня такая же ошибка с dexguard на студии android: Неудача [INSTALL_FAILED_UID_CHANGED] Любые идеи? – ThanosFisherman