Android Studio: Unexpected top level exception (finished with non-zero exit value 2..)

后端 未结 3 1437
半阙折子戏
半阙折子戏 2020-12-06 02:13

When i\'m trying to debug my android app i\'m getting the following error message:

Error:Execution failed for task \':app:transformClassesWithDexFor

3条回答
  •  情深已故
    2020-12-06 02:54

    I had the same issue, solved it by doing the following

    In the app build gradle file, inside android: add in defaultConfig:

    multiDexEnabled true
    

    and add this in the android:

    dexOptions {
        javaMaxHeapSize "4g"
    }
    

    Ref: https://stackoverflow.com/a/25006428/2069407

提交回复
热议问题