Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat

前端 未结 26 3369
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 02:29

If I run gradle assembleDebug from the command line, I am suddenly getting this error:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.util.DexEx         


        
26条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 03:03

    I had the same problem and it seems that my app had too many methods because of the libraries: http://developer.android.com/tools/building/multidex.html

    Solved it with:

    android {
       defaultConfig {
       ...
       multiDexEnabled = true
       }
    }
    

    More here Error:Execution failed for task ':app:dexDebug'. > comcommand finished with non-zero exit value 2

提交回复
热议问题