Android应用程序无法在某些设备上下载

时间:2015-01-16 06:59:47

标签: android android-manifest compatibility device

我遇到一个问题,即在某些应该受到良好支持的设备上无法下载该应用,但Google Play中的商家信息无效。

我通过开发控制台在APK不支持列表中看到大约1800个设备。其中有一些Galaxy S3,S4,S5型号(该列表有多个相同设备的变种)。约6577出现在支持列表中。

我在Manifest中有条目支持不同的屏幕尺寸和密度,这是我的清单部分:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.foo"
    android:versionCode="57"
    android:versionName="2.0.5" >

    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19"  />

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

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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>

    <uses-permission android:name="com.android.vending.BILLING" />

    <!-- Creating Permission to receive Google Maps -->
    <permission android:name="com.foo.supportmapfragment.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
    <!-- Permission to receive Google Maps -->
    <uses-permission android:name="com.foo.supportmapfragment.permission.MAPS_RECEIVE"/>

    <!-- Permission to read Google Services -->
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"  />

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

    <supports-screens
        android:anyDensity="true"
        android:resizeable="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <application
        android:name=".fooApp"
        android:hardwareAccelerated="true"
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:theme="@style/AppBaseTheme" >

        <meta-data android:name="DATABASE" android:value="foo.db" />
        <meta-data android:name="VERSION" android:value="2" />
        <meta-data android:name="QUERY_LOG" android:value="false" />
        <meta-data android:name="DOMAIN_PACKAGE_NAME" android:value="com.foo" />

        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="... key ..." />

        <uses-library android:name="com.google.android.maps"  />

        <activity android:name=".StatusActivity" android:screenOrientation="portrait" android:theme="@style/Theme.VPI" />
        <activity android:name=".StatusDetailsActivity" android:screenOrientation="portrait" />
        <activity android:name=".MyAlertsActivity" android:screenOrientation="portrait" />
        <activity android:name=".AlertLinesActivity" android:screenOrientation="portrait" />
        <activity android:name=".AlertDetailsActivity" android:screenOrientation="portrait" />
        <activity android:name=".PreferencesActivity" android:screenOrientation="portrait" android:theme="@style/Theme.Sherlock.Light"  />
        <activity android:name=".RouteListActivity" android:screenOrientation="portrait" android:theme="@style/Theme.VPI" />
        <activity android:name=".StopListActivity" android:screenOrientation="portrait" />
        <activity android:name=".StopTimesActivity" android:screenOrientation="portrait"/>
        <activity android:name=".UpgradeActivity" android:screenOrientation="portrait"/>
        <activity android:name=".TransfersActivity" android:screenOrientation="portrait" android:theme="@style/Theme.VPI" />
        <activity android:name=".TransfersDetailsActivity" android:screenOrientation="portrait" android:theme="@style/MyDialog" />
        <activity android:name=".MapActivity" android:theme="@style/Theme.VPI" android:configChanges="orientation|keyboardHidden" />
        <activity android:name=".TabHostActivity" android:configChanges="keyboardHidden|orientation|screenSize" />

        <activity android:name=".SplashActivity" android:screenOrientation="portrait" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <service android:name=".Service.NotificationService" />              

        <receiver android:name="com.foo.Receiver.MyAlarmReceiver"  />

        <receiver android:name="com.foo.Receiver.ConnectionChangedReceiver" android:exported="false">
            <intent-filter>
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
            </intent-filter>
        </receiver>     

        <receiver android:name="com.foo.Receiver.BootCompletedReceiver">
            <intent-filter>  
                <action android:name="android.intent.action.BOOT_COMPLETED" />  
            </intent-filter>  
        </receiver>

    </application>

</manifest>

过滤设备包括:Galaxy Note Edge和其他一些主流设备,一些三星平板电脑和华硕平板电脑也被过滤掉了。 Howerever适用于Nexus 7。

知道可能导致这种情况的原因吗?

5 个答案:

答案 0 :(得分:2)

首先从清单

中删除以下代码
<supports-screens
    android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"
    android:xlargeScreens="true"
    android:resizeable="true" 
    android:anyDensity="true" />

并检查您正在丢失的特定设备组,这可能会发生您正在丢失非常旧的api版本设备,现在有时人们没有使用

有关详细信息,请参阅以下链接

https://developer.android.com/google/play/filters.html

答案 1 :(得分:2)

尝试删除:

"<supports-screens
        android:anyDensity="true"
        android:resizeable="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />"

检查是否为每种支持的语言创建了本地化。并在4&#34;,5&#34;,6&#34;设备的Play商店中添加屏幕截图。和/或平板电脑。 同时将android:targetSdkVersion设置为21。 这应该可以解决你的问题。

答案 2 :(得分:1)

尝试在清单文件中使用<uses-feature>代替<uses-permission>&amp;为功能设置android:required="false" ..

所以替换

    

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

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>

<uses-permission android:name="com.android.vending.BILLING" />

<!-- Creating Permission to receive Google Maps -->
<permission android:name="com.foo.supportmapfragment.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<!-- Permission to receive Google Maps -->
<uses-permission android:name="com.foo.supportmapfragment.permission.MAPS_RECEIVE"/>

<!-- Permission to read Google Services -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"  />

    

<uses-feature android:name="android.permission.ACCESS_NETWORK_STATE" android:required="false" ></uses-feature >
<uses-feature android:name="android.permission.ACCESS_WIFI_STATE"  android:required="false" />

<uses-feature android:name="android.permission.INTERNET"  android:required="false" />
<uses-feature android:name="android.permission.RECEIVE_BOOT_COMPLETED"  android:required="false" />
<uses-feature  android:name="android.permission.VIBRATE" android:required="false" />
<uses-feature android:name="android.permission.READ_PHONE_STATE" android:required="false" ></uses-feature >
<uses-feature android:name="android.permission.READ_EXTERNAL_STORAGE" android:required="false" ></uses-feature >
<uses-feature android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false" ></uses-feature >

<uses-feature android:name="com.android.vending.BILLING"  android:required="false" />

<!-- Creating Permission to receive Google Maps -->
<uses-feature android:name="com.foo.supportmapfragment.permission.MAPS_RECEIVE" android:protectionLevel="signature" android:required="false" />
<!-- Permission to receive Google Maps -->
<uses-feature android:name="com.foo.supportmapfragment.permission.MAPS_RECEIVE" android:required="false" />

<!-- Permission to read Google Services -->
<uses-feature android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"   android:required="false" />

在进行此更改后,检查应用程序是否可在更多设备上下载..

答案 3 :(得分:1)

尝试使用aapt工具查看清单中存在哪些隐含功能,并通过向这些功能添加<uses-feature android:name="FREATURE_NAME" android:required="false" />使其成为可选功能。 此外,请确保您的应用在设备上没有这些功能时不会中断,方法是使用以下方法检查应用中可选功能的可用性:

protected boolean hasHardwareFeature(Context context, String feature)
{
    if (context.getPackageManager().hasSystemFeature(feature))
    {
        return true;
    }
    else
    {
        Log.i(TAG, "Device doesn't have hardware feature " + feature);
        return false;
    }
}

答案 4 :(得分:0)

删除此

<supports-screens
    android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"
    android:xlargeScreens="true"
    android:resizeable="true" android:anyDensity="true" />

尝试添加此

<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="19"
        tools:ignore="OldTargetApi" />

如果这是在Android Studio项目中,您需要在app / build.gradle文件中设置最小/最大值

另一种可能性是您具有特定设备尺寸/类型或屏幕分辨率的尺寸,布局或可绘制。