com.android.dex.DexIndexOverflowException

Execution failed for task ':client:transformClassesWithDexForHundsunBeta'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536

方法数超过65k

需要在主项目 进行分包  

application  继承 MultiDexApplication
​
public class DemoApplication extends MultiDexApplication {
    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
    }
}

​
compile 'com.android.support:multidex:1.0.1'
multiDexEnabled true
发布了4 篇原创文章 · 获赞 1 · 访问量 1747

猜你喜欢

转载自blog.csdn.net/liliKing1125/article/details/103895980
今日推荐