Android Studio TransformException : Error:Execution failed for task ':app:transformClassesWithDexForDebug'

后端 未结 10 1998
抹茶落季
抹茶落季 2020-11-27 20:11

I am getting the exception below when I am trying to run the application using Android Studio:

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

10条回答
  •  感动是毒
    2020-11-27 20:24

    I have same issue, after few hour research, i found a solution to fix it.

    You should fixed build.gradle :

    android {
    
        compileSdkVersion ..
        buildToolsVersion '...'
    
        defaultConfig {
           ...
           targetSdkVersion ..
           multiDexEnabled true  // this line will solve this problem
       }
    }
    

    If the number of method references in your app exceeds the 65K limit, your app may fail to compile.

    For information on how to do this, see Selectively compiling APIs into your executable and Building Apps with Over 65K Methods

提交回复
热议问题