Android 方法数量超出限制
Cannot fit requested classes in a single dex file (# methods: 87988 > 65536 ; # fields: 67206 > 65536)
解决方法
1、build.gradle里面
implementation 'com.android.support:multidex:1.0.3'
2、添加 multiDexEnabled true
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.ms.recyclerview"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
......
}
3、自己的Application添加代码
MultiDex.install(this);