美文网首页
Android 报错: Cannot fit requested

Android 报错: Cannot fit requested

作者: Alex0825 | 来源:发表于2020-07-07 19:30 被阅读0次

参考:Stack Overflow

修改 build.gradle(:app)

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.0"

    defaultConfig {
        applicationId "com.xxx.test.dave"
        minSdkVersion 19
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
        multiDexEnabled true <------这里

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
...
}
dependencies {
  ...
    implementation 'com.android.support:multidex:1.0.3' <---这里
  ...
}

Your Application must be of the Multidex type.. You must write it in the manifest :
android:name=".MyApplication" <---这里
"MyApplication" must be either the Multidex class, or it must extend it.

相关文章

网友评论

      本文标题:Android 报错: Cannot fit requested

      本文链接:https://www.haomeiwen.com/subject/drmzqktx.html