Android studio 2.0 gradle transformClassesWithDexForDebug fails when using button “run”

后端 未结 14 1886
被撕碎了的回忆
被撕碎了的回忆 2020-12-25 11:21

I have a problem after migration from android studio 1.5 to 2.0

In one of my project (only one) i can\'t use android studio run button,

because then, build

14条回答
  •  有刺的猬
    2020-12-25 12:09

    I discovered many solutions but I solved this issue by adding:

    Sol 1: In build.gradle:

    defaultConfig {
        multiDexEnabled true
    }
    

    Clean your project and rebuild.

    Sol 2: If still you have issue in local.properties add,

    org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m
    

    Sol 3 Still, You have issue add below mentioned dependency:

    compile 'com.android.support:multidex:1.0.1'
    

    Anyone solution will definitely work for you. Otherwise add all 3 in your application.

提交回复
热议问题