相关疑难解决方法(0)

Android Studio:Gradle - 构建失败 - 任务'执行失败':dexDebug'

错误:

Gradle: Execution failed for task ':vertretungsplan:dexDebug'.
> Failed to run command:
    P:\Android-Studio\sdk\build-tools\18.0.1\dx.bat --dex --output P:\Projekte\VertretungsplanProject\vertretungsplan\build\libs\vertretungsplan-debug.dex P:\Projekte\VertretungsplanProject\vertretungsplan\build\classes\debug P:\Projekte\VertretungsplanProject\vertretungsplan\build\dependency-cache\debug P:\Android-Studio\sdk\extras\android\m2repository\com\android\support\support-v4\18.0.0\support-v4-18.0.0.jar P:\Projekte\VertretungsplanProject\vertretungsplan\libs\commons-io-2.4.jar P:\Projekte\VertretungsplanProject\vertretungsplan\build\exploded-bundles\VertretungsplanProjectLibrariesActionbarsherlockUnspecified.aar\classes.jar
Error Code:
    2
Output:
    trouble processing:
    bad class file magic (cafebabe) or version (0033.0000)
    ...while parsing de/MayerhoferSimon/Vertretungsplan/LoginActivity$2.class
    ...while processing de/MayerhoferSimon/Vertretungsplan/LoginActivity$2.class
    trouble processing:
    bad class file magic (cafebabe) or version (0033.0000)
    ...while parsing de/MayerhoferSimon/Vertretungsplan/MainActivity$1.class
    ...while processing de/MayerhoferSimon/Vertretungsplan/MainActivity$1.class
    trouble processing:
    bad class file magic (cafebabe) or version (0033.0000)
    ...while parsing de/MayerhoferSimon/Vertretungsplan/YQL/YqlVplanParser.class
    ...while processing de/MayerhoferSimon/Vertretungsplan/YQL/YqlVplanParser.class
    3 warnings
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dx.util.DexException: Multiple …
Run Code Online (Sandbox Code Playgroud)

android gradle android-studio android-gradle-plugin

82
推荐指数
3
解决办法
17万
查看次数

仅在运行测试时出现DexIndexOverflowException

我可以在我的调试和发布版本中成功构建和运行我的Android应用程序,没有任何问题.然而,当我尝试运行我的新单元测试(之前从未有过它)时,我得到了可怕的DexIndexOverflowException.我怀疑ProGuard是不是运行我的单元测试,但它是我正常的调试和发布buildTypes.

ProGuard在单元测试运行配置中运行需要做什么?我搜索了Gradle文档,ProGuard文档和Android Studio文档来解决这个问题但我一无所获.

android unit-testing proguard gradle android-gradle-plugin

12
推荐指数
1
解决办法
5925
查看次数