
清理并查看是否存在错误(如果是),
1.转到
build.gradle文件。加
multiDexEnabled true
defaultConfig { multiDexEnabled true}2.在您的依赖项中添加
compile 'com.android.support:multidex:1.0.1'
dependencies { compile 'com.android.support:multidex:1.0.1'}3.在清单中添加您的应用程序标签
android:name="android.support.multidex.MultiDexApplication"
<application android:name="android.support.multidex.MultiDexApplication" ....
4.在启动活动中使用此替代方法
@Override protected void attachbaseContext(Context base) { super.attachbaseContext(base); MultiDex.install(this); }欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)