Android 应用程序与 Play 商店中的新设备不兼容

Posted

技术标签:

【中文标题】Android 应用程序与 Play 商店中的新设备不兼容【英文标题】:Android Application is not compatible for new devices on play store 【发布时间】:2020-10-19 13:19:57 【问题描述】:

不支持我的应用程序 对于新的 android 设备版本:您的设备与此版本不兼容。 我的清单文件是:所有权限和屏幕尺寸.android清单文件

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            package="com.fs.android.application" >
            //permissions
            <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" android:required="false"  />
            <uses-permission android:name="android.permission.CALL_PHONE" android:required="false"  />
            <uses-permission android:name="android.permission.CAMERA" android:required="false" />
            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false"  />
            <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:required="false" />
            <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" android:required="false" />
            <uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" android:required="false" />
            <uses-permission android:name="android.permission.INTERNET" android:required="false" />
            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:required="false" />
            <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:required="false" />
            <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" android:required="false" />
            <uses-feature android:name="android.hardware.CAMERA" android:required="false" />
            <uses-feature android:name="android.hardware.wifi.direct" android:required="false" />
            <uses-feature android:name="android.hardware.wifi" android:required="false" />
            //Device screen size
            <compatible-screens>
                <!-- all small size screens -->
                <screen android:screenSize="small" android:screenDensity="ldpi" />
                <screen android:screenSize="small" android:screenDensity="mdpi" />
                <screen android:screenSize="small" android:screenDensity="hdpi" />
                <screen android:screenSize="small" android:screenDensity="xhdpi" />
                <screen android:screenSize="small" android:screenDensity="xxhdpi" />
                <screen android:screenSize="small" android:screenDensity="xxxhdpi" />
                <!-- all normal size screens -->
                <screen android:screenSize="normal" android:screenDensity="ldpi" />
                <screen android:screenSize="normal" android:screenDensity="mdpi" />
                <screen android:screenSize="normal" android:screenDensity="hdpi" />
                <screen android:screenSize="normal" android:screenDensity="xhdpi" />
                <screen android:screenSize="normal" android:screenDensity="xxhdpi" />
                <screen android:screenSize="normal" android:screenDensity="xxxhdpi" />
                <screen android:screenSize="large" android:screenDensity="ldpi" />
                <screen android:screenSize="large" android:screenDensity="mdpi" />
                <screen android:screenSize="large" android:screenDensity="hdpi" />
                <screen android:screenSize="large" android:screenDensity="xhdpi" />
                <screen android:screenSize="large" android:screenDensity="xxhdpi" />
                <screen android:screenSize="large" android:screenDensity="xxxhdpi" />
                <screen android:screenSize="xlarge" android:screenDensity="ldpi" />
                <screen android:screenSize="xlarge" android:screenDensity="mdpi" />
                <screen android:screenSize="xlarge" android:screenDensity="hdpi" />
                <screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
                <screen android:screenSize="xlarge" android:screenDensity="xxhdpi" />
                <screen android:screenSize="xlarge" android:screenDensity="xxxhdpi" />
            </compatible-screens>
            //screen size
            <supports-screens
                android:smallScreens="true"
                android:normalScreens="true"
                android:largeScreens="true"
                android:xlargeScreens="true"
                />
            </application>
        </manifest>

build.gradle:所有库和 SDK version.android gradle 文件。

apply plugin: 'com.android.application'
    android 
        //compile sdk
        compileSdkVersion 30
        defaultConfig 
            applicationId "com.fs.android.application"
            //minimum sdk
            minSdkVersion 18
            //target sdk version
            targetSdkVersion 30
            versionCode 5
            versionName "5"
            multiDexEnabled true
        
        buildTypes 
            release 
                debug 
                    debuggable false
                
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            
        
    
    dependencies 
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        //noinspection GradleCompatible
        implementation 'androidx.legacy:legacy-support-v13:1.0.0'
        testImplementation 'junit:junit:4.12'
        //noinspection GradleCompatible
        androidTestImplementation 'androidx.test.ext:junit:1.1.1'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
        // google support library ---------------------------------------------------------------------
        //implementation 'com.android.support:appcompat-v7:27.1.1'
        //noinspection GradleCompatible
        implementation 'com.google.android.material:material:1.1.0'
        //noinspection GradleCompatible
        implementation 'androidx.cardview:cardview:1.0.0'
        //noinspection GradleCompatible
        implementation 'androidx.recyclerview:recyclerview:1.1.0'
        //noinspection GradleCompatible
        implementation 'androidx.legacy:legacy-support-v13:1.0.0'
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
        //noinspection GradleCompatible
        implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
        // third party dependencies -------------------------------------------------------------------
        implementation 'com.balysv:material-ripple:1.0.2' // ripple effect
        implementation 'com.github.bumptech.glide:glide:3.7.0' // image loader
        implementation 'com.wdullaer:materialdatetimepicker:3.2.0' // date & time picker
        implementation 'com.mikhaellopez:circularimageview:3.2.0' // circle image view
        implementation 'com.github.pchmn:MaterialChipsInput:1.0.5' // material chip
        implementation 'com.hootsuite.android:nachos:1.1.1' // material chips
        implementation 'com.google.android:flexbox:0.3.2' // google flexible box
        implementation 'com.crystal:crystalrangeseekbar:1.1.3' // range seek bar
        implementation 'com.squareup.retrofit2:retrofit:2.0.0'
        implementation 'com.squareup.retrofit2:converter-gson:2.0.0'
        implementation 'com.afollestad.material-dialogs:core:0.9.4.5'
        implementation 'com.google.android.gms:play-services:9.0.2'
        //implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation "com.squareup.picasso:picasso:2.4.0"
        //implementation 'com.android.support:appcompat-v7:27.1.1'
        //noinspection GradleCompatible
        implementation 'androidx.recyclerview:recyclerview:1.1.0' // dependency file for RecyclerView
        //noinspection GradleCompatible
        implementation 'androidx.cardview:cardview:1.0.0'
        implementation 'com.wrapp.floatlabelededittext:library:0.0.6'
        implementation 'com.miguelcatalan:materialsearchview:1.4.0'
        implementation 'com.github.chivorns:smartmaterialspinner:1.0.4'
        implementation 'com.wrapp.floatlabelededittext:library:0.0.6'
        implementation 'me.dm7.barcodescanner:zxing:1.9'
        implementation 'com.wrapp.floatlabelededittext:library:0.0.6'
        //noinspection GradleCompatible
        implementation 'androidx.core:core:1.3.0'
        //noinspection GradleCompatible
        implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
        //noinspection GradleCompatible
        implementation 'androidx.legacy:legacy-support-core-ui:1.0.0'
        implementation 'androidx.multidex:multidex:2.0.1'
        //implementation 'org.apache.directory.studio:org.apache.commons.io:2.4'
        implementation group: 'commons-io',
        name: 'commons-io',
        version: '2.4'
    

【问题讨论】:

检查合并清单 - 可能是一些库添加了一些东西......还有你为什么要触摸 compatible-screenssupports-screens 为什么在发布构建类型中有一个调试标签? 我删除但不解决 支持版本 10 和很多移动支持,但不支持三星和小米手机,因为刘海相机。 【参考方案1】:

要修复“您的设备与此版本不兼容”错误消息,请尝试清除 Google Play 商店缓存和存储空间,然后重新启动 Google Play 商店应用并再次尝试安装该应用。

    启动“设置”应用 转到“应用程序”或“应用程序管理器” 查找“Google Play 商店” 选择“存储和缓存” 清除存储和缓存 再次启动 Google Play 商店应用

【讨论】:

以上是关于Android 应用程序与 Play 商店中的新设备不兼容的主要内容,如果未能解决你的问题,请参考以下文章

Play商店预发布报告中的Android应用程序崩溃但在真实设备中工作

Play商店中的Android应用状态显示预注册而不是安装[关闭]

为啥 Google Play 商店说我的 Android 应用与我自己的设备不兼容?

从 Play 商店中的不同帐户安装的应用程序未被 Android Management API 阻止

无法从 android webview 打开 google play 商店

Android Play 商店中的 Delphi 11 应用程序显示警告:非 SDK API