我的应用程序显示不兼容nexus 5?

时间:2013-12-04 11:12:19

标签: android android-webview

我的应用程序在除nexus 5之外的设备上运行良好。在我的显示文件中,我添加了

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

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



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

我的应用程序也是混合版。 有人有同样的问题?? 任何人都可以建议我一些解决方案,我错过了什么? 任何帮助都是适当的。 感谢

3 个答案:

答案 0 :(得分:2)

Nexus 5状态为xxhdpi(总是= 480),因此需要更新manifest.xml文件,如下所示:

<compatible-screens>

    <!-- all small size screens -->
    <screen
        android:screenDensity="ldpi"
        android:screenSize="small" />
    <screen
        android:screenDensity="mdpi"
        android:screenSize="small" />
    <screen
        android:screenDensity="hdpi"
        android:screenSize="small" />
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="small" />
    <screen
        android:screenDensity="445"
        android:screenSize="small" />
    <screen
        android:screenDensity="480"
        android:screenSize="small" />

    <!-- all normal size screens -->
    <screen
        android:screenDensity="ldpi"
        android:screenSize="normal" />
    <screen
        android:screenDensity="mdpi"
        android:screenSize="normal" />
    <screen
        android:screenDensity="hdpi"
        android:screenSize="normal" />
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="normal" />
    <!-- Nexus 5 : 445ppi -->
    <screen
        android:screenDensity="445"
        android:screenSize="normal" />
    <screen
        android:screenDensity="480"
        android:screenSize="normal" />
    <!-- all large size screens -->

    <screen
        android:screenDensity="ldpi"
        android:screenSize="large" />
    <screen
        android:screenDensity="mdpi"
        android:screenSize="large" />
    <screen
        android:screenDensity="hdpi"
        android:screenSize="large" />
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="large" />
    <screen
        android:screenDensity="445"
        android:screenSize="large" />
    <screen
        android:screenDensity="480"
        android:screenSize="large" />
    <!-- all x large size screens -->

    <screen
        android:screenDensity="ldpi"
        android:screenSize="xlarge" />
    <screen
        android:screenDensity="mdpi"
        android:screenSize="xlarge" />
    <screen
        android:screenDensity="hdpi"
        android:screenSize="xlarge" />
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="xlarge" />
    <screen
        android:screenDensity="445"
        android:screenSize="xlarge" />
    <screen
        android:screenDensity="480"
        android:screenSize="xlarge" />
</compatible-screens>

这是非常必要的。

谢谢,

答案 1 :(得分:0)

将此添加到您的清单文件中。

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

答案 2 :(得分:-1)

android:targetSdkVersion="17"更改为android:targetSdkVersion="19"并在SDK Manager中安装api 19.

希望这有帮助。