【问题标题】:My app showing doen't compatible for nexus 5?我的应用显示与 nexus 5 不兼容?
【发布时间】:2013-12-04 11:12:18
【问题描述】:

我的应用程序在除 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>

我的应用也是混合的。 有人有同样的问题吗?? 谁能建议我一些解决方案,我到底错过了什么? 任何帮助都是适当的。 谢谢

【问题讨论】:

  • 您所说的“运行不佳”到底是什么意思。根据 Google Play 商店不兼容吗?
  • 是的,它在 google play 上显示不兼容的消息
  • 您已经解决了这个问题吗?您想更新新答案吗? @Ram 的答案对我不起作用。
  • @AlexTran Ram 解决方案对我有用...使用他的解决方案我也兼容 Nexus 7
  • 您不需要将 添加到您的 manifest.xml 文件中吗?只使用 ?

标签: android android-webview


【解决方案1】:

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>

真的很有必要。

谢谢,

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

    • 我按照你的回答和问这个问题的人的编码,但不能像我一样工作。请告诉更多细节...
    • @AlexTran 由于设备尺寸不同而导致的问题。您可以通过在 1920 x 1200 像素 rate 的分辨率下为 nexus 7 更改两个不同 dpi.xhdpi 的图像来解决此问题。对于 nexus 的 xxhdpi 5 分辨率为 1080 x 1920 像素率。
    • 你的意思是我将创建文件夹 layout-xhdpi-1920x1200 和 layout-xxhdpi-1080x1920?文件夹drawable怎么样?只需要使用drawable-xhdpi和drawable-xxhdpi?
    • @AlexTran 可绘制文件夹下的文件夹名称是什么。但 nexus 的图像应该是 1080 x 1920 像素率。供参考stackoverflow.com/questions/22140135/…
    【解决方案3】:

    将 android:targetSdkVersion="17" 更改为 android:targetSdkVersion="19" 并在您的 SDK 管理器中安装 api 19。

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 2016-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-16
      • 1970-01-01
      • 2012-07-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多