简体   繁体   中英

Why are my supported android devices so low?

Why are my supported android devices so low? I've tried to target the lowest possible apk (13), and yet only 12,000 devices can use my app.

Any help would be much appreciated!

Here is my build.gradle.

android {
signingConfigs {
}
compileSdkVersion 23
buildToolsVersion '25.0.0'
defaultConfig {
    applicationId "thomas.surfaceviewtest"
    minSdkVersion 13
    targetSdkVersion 13
    versionCode 5
    versionName "1.0.5"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    debug {
    }
}
dexOptions {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.android.gms:play-services-ads:9.4.0'
compile 'com.google.firebase:firebase-ads:9.4.0'
}
apply plugin: 'com.google.gms.google-services'

在此处输入图片说明

That number is comparting your manifest configuration and a list of devices know by Google (see the list of devices ).

It is not a number of real devices, but a number of model supported, so 12000 models on the market is a good number I believe.

Its because your target sdk level is low

targetSdkVersion 13

Update it to 25 so it will support more devices

targetSdkVersion 25

You can check for more android sdk version here

My app is compatible with 12611 devices. That is basically the same as you have. 12000 devices isn't little, especially given the fact that there are "only" 1465 unsupported devices as a result of my minSdk version being high.

Targeting 12k devices isn't little, it is a lot. If you were only targeting say 8k that would be something you should look into.

You should still change compile and minSdk versions to 25 or 26 (7.1 or 8.0) to make sure your app can run the newest API's.

I'd like to clarify the fact that targeting API 13 doesn't exclude API 14-26 from installing the app . It indicates what version it is designed for. You compile against 23 so you have the new API's included, but you only use API 13.

This should help:

android:targetSdkVersion

An integer designating the API Level that the application targets. If not set, the default value equals that given to minSdkVersion . This attribute informs the system that you have tested against the target version and the system should not enable any compatibility behaviors to maintain your app's forward-compatibility with the target version. The application is still able to run on older versions (down to minSdkVersion ).

As Android evolves with each new version, some behaviors and even appearances might change. However, if the API level of the platform is higher than the version declared by your app's targetSdkVersion , the system may enable compatibility behaviors to ensure that your app continues to work the way you expect. You can disable such compatibility behaviors by specifying targetSdkVersion to match the API level of the platform on which it's running. For example, setting this value to "11" or higher allows the system to apply a new default theme (Holo) to your app when running on Android 3.0 or higher and also disables screen compatibility mode when running on larger screens (because support for API level 11 implicitly supports larger screens).

Source: https://developer.android.com/guide/topics/manifest/uses-sdk-element.html

您应该增加目标sdk水平。

targetSdkVersion 25

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM