Android Studio分包

The number of method references in a .dex file cannot exceed 64k.
方法总数超过了64k。

解决方案:分包

  1. project-->app-->build.gradle

    在defaultConfig中加上一句:
    multiDexEnabled true

  2. 还是这个文件,在dependencies中加上
    compile 'com.android.support:multidex:1.0.0'

  3. 编译一下

  4. 打开项目的application文件,继承换成MultiDexApplication

你可能感兴趣的:(Android Studio分包)