Как сделать мое приложение совместимым со всеми версиями (от 4.4 до 28)? - PullRequest
0 голосов
/ 27 августа 2018
  1. У меня есть приложение для электронной коммерции на Android store, оно будет отлично работать на всех версиях Android, кроме Android 8.0, на реальном устройстве.

приложение будет работать на эмуляторе со всеми androidверсий, но на Mi A1 (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)?

1 Ответ

0 голосов
/ 30 августа 2018
  1. Вы не можете исправить ошибку, если ничего о ней не знаете.Вы можете добавить Crashlytics или подобный сервис в ваше приложение, чтобы получать журналы сбоев с клиентских устройств.

  2. Установите для параметра minSdkVersion значение 17 в вашем build.gradle, и вы получите приложение, совместимое со всеми androidверсии от 4.4.

...