解决安卓中单个dex方法数超过65535的方法

1、百度下载  60K-methods.jar包,复制至libs文件夹中,添加到gradle中

2、在build.gradle中的defaultConfig{}下添加 multiDexEnabled true

3、  方法一、在manifest文件中,application下添加  android:name= "android.support.multidex.MultiDexApplication"

  方法二、新建Application类,在onCreate方法中,添加方法 MultiDex.install(getTargetContext());     推荐使用attachBaseContext()方法

posted @ 2017-08-07 18:44  阿金好掂  阅读(272)  评论(0编辑  收藏  举报