【问题标题】:Android app showing incompatible after publishingAndroid 应用发布后显示不兼容
【发布时间】:2015-08-22 22:34:02
【问题描述】:

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

清单

<?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>

分级

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'
}

【问题讨论】:

    标签: android android-studio google-play publish


    【解决方案1】:

    最有可能的原因如下:

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

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

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

    【讨论】:

    • 它与 4.4 以上的 Motorola Turbo X 和 CoolPad 5560 不兼容
    【解决方案2】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多