如何使我的应用程序与所有版本(4.4至28)兼容? 我在play store上有一个电子商务android应用程序,除了在实际设备上的android 8.0之外,它在所有android版本上都能正常工作

如何使我的应用程序与所有版本(4.4至28)兼容? 我在play store上有一个电子商务android应用程序,除了在实际设备上的android 8.0之外,它在所有android版本上都能正常工作,android,android-version,Android,Android Version,该应用程序在所有android版本的emulator上都能正常工作,但在MIA1(8.1)上会崩溃,我没有那个设备来测试该应用程序 如何解决这个问题 apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion '27.0.3' defaultConfig { applicationId "com.ecommerce.app"

该应用程序在所有android版本的emulator上都能正常工作,但在MIA1(8.1)上会崩溃,我没有那个设备来测试该应用程序

如何解决这个问题

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "com.ecommerce.app"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 4
        versionName "1.4"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support.constraint:constraint-layout:1.1.0'
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.github.bumptech.glide:glide:3.6.1'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.github.jd-alexander:LikeButton:0.2.3'
    compile 'org.apache.commons:commons-math3:3.6.1'
    compile 'org.apache.commons:commons-lang3:3.6'
    testCompile 'junit:junit:4.12'
    compile 'com.google.android.gms:play-services-analytics:10.0.0'
    compile 'com.yahoo.mobile.client.android.util.rangeseekbar:rangeseekbar-library:0.1.0'
//    compile 'com.google.android.gms:play-services-appindexing:8.4.0'
    compile 'com.google.firebase:firebase-appindexing:10.0.0'
    compile files('libs/googlecollections-1.0.jar')
}
  • 如何使android应用程序与所有版本(4.4到28)兼容
  • 如果你对这个bug一无所知,你就无法修复它。您可以向应用程序添加Crashlytics或类似服务,以从客户端设备获取崩溃日志

  • 在build.gradle中将minSdkVersion参数设置为17,您的应用程序将与4.4中的所有android版本兼容


  • 请共享错误共享错误日志。您可以在android开发者控制台中找到崩溃报告您可以在Google开发者控制台中获取此特定应用程序的日志,有数百种方法可以从远程设备获取日志,请使用其中一种。