包括multidex,但仍无法从Play商店中使应用程序崩溃下载

时间:2019-07-04 09:15:29

标签: java android android-studio google-play-services google-console-developer

应用运行良好的android studio,但是每当从play store应用下载的应用在android牛轧糖或更低的版本上崩溃时,我就会包含multidex,但仍然存在相同的错误

Build Gradle:

    compileSdkVersion 29
    buildToolsVersion "29.0.0"
    defaultConfig {
        applicationId "com.------.--"
        minSdkVersion 15                    //lowsdk then 20
        targetSdkVersion 29
        multiDexEnabled true               //enable multiDexEnabled
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

依赖性:

dependencies {

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.gms:play-services-ads:18.0.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.google.android.material:material:1.0.0'


    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

}

MainActivity:


public class MainActivity extends AppCompatActivity  implements View.OnClickListener  {

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base)
        MultiDex.install(this)
    }

   continue

}

Stack Trace Image

0 个答案:

没有答案