我正在尝试使用 Android Studio 运行 Dexguard。但无法构建项目。
异常是在“ apply plugin 'dexguard'
”行中引起的。
例外是Cannot add task ':XXXX:uninstallAll' as a task with that name already exists.
堆栈跟踪是:
Caused by: org.gradle.api.InvalidUserDataException: Cannot add task ':XXXX:uninstallAll' as a task with that name already exists.
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:60)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:94)
at org.gradle.api.tasks.TaskContainer$create$0.call(Unknown Source)
at com.android.build.gradle.BasePlugin.apply(BasePlugin.groovy:195)
at com.android.build.gradle.AppPlugin.super$2$apply(AppPlugin.groovy)
at com.android.build.gradle.AppPlugin.apply(AppPlugin.groovy:80)
at com.saikoa.dexguard.g.super$3$apply(DexGuard)
at com.saikoa.dexguard.g.apply(DexGuard:61)
at com.saikoa.dexguard.g.apply(DexGuard)
编辑:
dexguard 插件本身使用“android”插件。我也在应用“android”插件,它导致了异常。