Atlas Dex分包配置

Dex分包只对Host生效,对Bundle不生效。也就是在Bundle内不能做Dex分包处理,若方法数超过65536,只能拆分Bundle。

android {
    defaultConfig {
        multiDexEnabled true
    }
}

atlas {
    atlasEnabled true
    tBuildConfig {
        atlasMultiDex true
    }
}

如没有配置multiDexEnabled true,则报错:

Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com
.android.dex.DexIndexOverflowException: field ID not in [0, 0xffff]: 65536
上一篇 Atlas框架下通过ViewPager+Fragment加载Bundle的Activity不能回调onActivityResult问题解决
下一篇 Atlas通过RemoteTransactor加载并运行远程Bundle
目录
文章列表
1 Laravel集成EasyWeChat接收普通消息和事件推送
Laravel集成EasyWeChat接收普通消息和事件推送
2
Android实现3种Notification(状态栏通知)
Android实现3种Notification(状态栏通知)
3
解决Vagrant中的CentOS主机无法ssh远程连接的问题
解决Vagrant中的CentOS主机无法ssh远程连接的问题
4
Spring Boot HTTP接口GET请求
Spring Boot HTTP接口GET请求
5
Android NDK基础13:JNI异常处理_JNI缓存策略
Android NDK基础13:JNI异常处理_JNI缓存策略
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。