Android应用不适用于Marshmallow设备

时间:2016-06-09 12:37:01

标签: android google-play android-manifest android-6.0-marshmallow

我的应用程序根本没有在Play商店中显示Android 6设备。我尝试了谷歌支持,他们也不知道这个问题。 我的清单在API 23上没有任何特定限制,只有GPS用于使用功能,但没有设备能够安装该应用程序。

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

    <!-- Maps API needs OpenGL ES 2.0. -->
    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="false" />

    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23" />


    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.CALL_PHONE" />

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

    <permission
        android:name="${applicationId}.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <uses-permission android:name="${applicationId}.permission.MAPS_RECEIVE" />


    <application
        android:name=".applicationclass"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme">
        <activity
            android:name=".splash.SplashContainer"
            android:label="@string/app_name"
            android:theme="@style/AppThemeNoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".splash.SplashActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" />
        <activity
            android:name=".home.HomeActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" />
        <activity
            android:name=".register.WelcomeActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" />
        <activity
            android:name=".register.RegisterActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" />

        <receiver android:name=".services.Pulse" />

        <service
            android:name="com.google.android.gms.analytics.AnalyticsService"
            android:exported="false" />

        <receiver android:name="ServiceWakingReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.QUICKBOOT_POWERON" />
            </intent-filter>
        </receiver>

        <receiver android:name="com.google.android.gms.analytics.AnalyticsReceiver">
            <intent-filter>
                <action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
            </intent-filter>
        </receiver>

        <receiver android:name="com.google.android.gms.analytics.CampaignTrackingReceiver">
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
        </receiver>

        <service android:name="com.google.android.gms.analytics.CampaignTrackingService" />

        <!-- Maps key -->
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="key" />
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <meta-data
            android:name="io.fabric.ApiKey"
            android:value="key" />
    </application>
</manifest>

2 个答案:

答案 0 :(得分:3)

与Google支持小组聊天后,他们与我分享了这个问题。

他们的报告在三星S5手机上发布了这个:

Missing device feature:
android.hardware.telephony

Google Play将Android 6.0.x手机标记为使用 android.hardware.telephony 时不兼容,即使该设备有此功能;

我将此添加到我的清单中,问题解决了:

    <uses-permission
    android:name="android.permission.CALL_PHONE"
    android:required="false" />

<uses-feature
    android:name="android.hardware.telephony"
    android:required="false" />

答案 1 :(得分:0)

确保在build.gradle中定义了正确的SDK版本。

defaultConfig {

    /**
     * applicationId uniquely identifies the package for publishing.
     * However, your source code should still reference the package name
     * defined by the package attribute in the main/AndroidManifest.xml file.
     */

    applicationId 'com.xx.xx'

    // Defines the minimum API level required to run the app.
    minSdkVersion 9

    // Specifies the API level used to test the app.
    targetSdkVersion 23

    //Other settings...

}

要更详细地设置您的gradle文件,请选中this example