Android 应用在发布后显示不兼容

Android app showing incompatible after publishing

我刚刚尝试发布我的第一个应用程序,但当它最终通过时,它被显示为与多个设备不兼容,我一直在搜索,但我遇到的每一个修复都对我没有任何帮助。有什么建议吗?

清单

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.customledsupply.ledaudit" >

    <uses-feature
        android:name="android.hardware.camera2"
        android:required="true" />

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/cls"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainPage"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".OldLocation"
            android:label="@string/title_activity_old_location" >
        </activity>
        <activity
            android:name=".NewLocation"
            android:label="@string/title_activity_new_location" >
        </activity>
        <activity
            android:name=".RoomDescription"
            android:label="@string/title_activity_room_description" >
        </activity>
        <activity
            android:name=".FixtureDescription"
            android:label="@string/title_activity_fixture_description" >
        </activity>
        <activity
            android:name=".RoomList"
            android:label="@string/title_activity_room_list" >
        </activity>
        <activity
            android:name=".Summary"
            android:label="@string/title_activity_summary" >
        </activity>
    </application>

</manifest>

Gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.customledsupply.ledaudit"
        minSdkVersion 19
        targetSdkVersion 22
        versionCode 2
        versionName "2.0"
    }
    signingConfigs {
        release {
            storeFile file("myreleasekey.keystore")
            storePassword "CLS"
            keyAlias "Custom LED Supply"
            keyPassword "CLS"
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'io.realm:realm-android:0.82.0'
}

最有可能的潜在原因如下:

<uses-feature
    android:name="android.hardware.camera2"
    android:required="true" />

如果任何设备没有此功能,它甚至不会在他们的 Play 商店中显示,并且会出现在您的 incompatible devices 列表中。如果您想将其设为可选,请改用 android:required="false"。通过这样做,您也许可以解决这个问题。

否则,如果您提供不兼容设备的示例,我们或许可以进一步缩小问题范围。希望对你有帮助。

在您的 AppManifest.xml 中,您添加了一项 android:name="android.hardware.camera2" 并非所有设备都支持的功能。它只支持 API 21+。但是,您可以将 required 属性设置为 false,但这会导致您的应用出现问题。

参考Link:https://developer.android.com/reference/android/hardware/camera2/package-summary.html