三步搞定:
一、首先在build中加入:
defaultConfig配置中:
multiDexEnabled true
二、加入依赖库://超出65535的方法数,需要动态dex多编译 compile 'com.android.support:multidex:1.0.1'
三、BaseApplication中加入//超出65535的方法数,需要动态dex多编译 @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); } 四、记得在清单文件中加入<application android:name="xxx.xxx.xxx.BaseApplication" ....