如何增加应用的设备兼容性?

时间:2013-02-02 18:01:20

标签: android android-manifest compatibility

我发现我无法使用任何新的Android手机(Galaxy Note和HTC Evo 4g lte)在Google Play上找到我的应用。我认为它与我的清单有关。

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

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

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<compatible-screens>
    <screen android:screenSize="small" android:screenDensity="ldpi"/>
    <screen android:screenSize="normal" android:screenDensity="mdpi"/>
    <screen android:screenSize="large" android:screenDensity="hdpi"/>
    <screen android:screenSize="xlarge" android:screenDensity="xhdpi"/>
</compatible-screens>
<supports-screens android:xlargeScreens="true" android:smallScreens="true" android:anyDensity="true" android:resizeable="true" android:normalScreens="true" android:largeScreens="true"/>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <!-- AdMobActivity definition -->
<activity android:name="com.google.ads.AdActivity"
android:configChanges=    "keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
    <activity
        android:name="com.example.MainActivity"
        android:label="@string/app_name"
        android:configChanges="orientation|keyboardHidden|keyboard" >

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>

3 个答案:

答案 0 :(得分:6)

<compatible-screens>
    <screen android:screenSize="small" android:screenDensity="ldpi"/>
    <screen android:screenSize="normal" android:screenDensity="mdpi"/>
    <screen android:screenSize="large" android:screenDensity="hdpi"/>
    <screen android:screenSize="xlarge" android:screenDensity="xhdpi"/>
</compatible-screens>

这限制了您对具有小屏幕和ldpi的设备的兼容性。因此不支持使用mdpi的小屏幕。我会删除此块,<supports-screens>应该足以让所有设备都能看到它。

答案 1 :(得分:3)

  

我认为这与我的清单有关。

这是正确的。

我首先要删除您的<compatible-screens>元素,或至少扩展大小/密度组合列表。就目前而言,在16种可能性中,你声称只支持其中的4种,而有些(例如small / ldpi)则相当不受欢迎。如果您尝试表示支持所有尺寸和密度,请删除<compatible-screens>元素。

答案 2 :(得分:-1)

它与您的清单文件无关。例如,您可以通过智能手机上的“搜索”选项找到应用,即使该应用仅适用于平板电脑。

您无法找到自己的应用的原因是,在您的搜索结果中不足以显示您的应用,它会出现在多页应用之后。

要查看您的应用,只需键入应用程序的包而不是名称。 例如:com.example.myapp

相关问题