【问题标题】:Application is incompatible with tablets应用程序与平板电脑不兼容
【发布时间】:2016-03-22 13:11:58
【问题描述】:

我在 Xamarin Studio 中创建了一个项目,当我在 Google Play 中发布时似乎出现了一些问题:

应用发布后,我可以正常安装在手机上,但是当我尝试通过平板电脑访问 Google Play 中的应用时,却说应用与设备不兼容。

我是 android 开发新手,所以对此我有一些疑问...我尝试在应用程序清单中添加兼容的屏幕:

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="my.package.name" android:versionName="1.0.0" android:versionCode="42">
    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-feature android:name="android.hardware.camera.autofocus" />
    <permission android:protectionLevel="signature" android:name="my.package.name.permission.C2D_MESSAGE" />
    <uses-permission android:name="my.package.name.permission.C2D_MESSAGE" />
    <application android:label="MyApplication" android:icon="@drawable/Icon" android:theme="@android:style/Theme.NoTitleBar">
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/FacebookAppID" />
    <activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="@string/ApplicationName" />
    <service android:name="parse.ParsePushService" />
    <receiver android:name="parse.ParsePushBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
            <category android:name="my.package.name" />
        </intent-filter>
    </receiver>
    </application>
    <compatible-screens>
        <!--all normal size screens -->
        <screen android:screenSize="normal" android:screenDensity="ldpi" />
        <screen android:screenSize="normal" android:screenDensity="mdpi" />
        <screen android:screenSize="normal" android:screenDensity="hdpi" />
        <screen android:screenSize="normal" android:screenDensity="xhdpi" />
        <!-- all large size screens -->
        <screen android:screenSize="large" android:screenDensity="ldpi" />
        <screen android:screenSize="large" android:screenDensity="mdpi" />
        <screen android:screenSize="large" android:screenDensity="hdpi" />
        <screen android:screenSize="large" android:screenDensity="xhdpi" />
        <!-- all xlarge size screens -->
        <screen android:screenSize="xlarge" android:screenDensity="ldpi" />
        <screen android:screenSize="xlarge" android:screenDensity="mdpi" />
        <screen android:screenSize="xlarge" android:screenDensity="hdpi" />
        <screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
        <!-- Special case for Nexus 7 -->
        <screen android:screenSize="large" android:screenDensity="213" />
     </compatible-screens>
</manifest>

我收到了一些关于平板电脑不兼容的电子邮件,因此我尝试了 1 个物理平板电脑和 2 个虚拟平板电脑,但它们确实不兼容。

我还需要其他东西吗?还是问题出在 Google Play 开发者控制台?

【问题讨论】:

  • 您不应该在清单中需要 compatible-screens 标记。您可以发布其余的清单吗?您应该能够在 Google Play 开发控制台的 APK 详细信息页面中查看设备列表,以查看那里是否列出了任何平板电脑。您确定所有平板电脑都不兼容还是只是特定的平板电脑类型?我还在清单中添加了以下内容,但我认为这不会阻止平板电脑 &lt;uses-feature android:name="android.hardware.screen.portrait" android:required="false" /&gt;&lt;uses-feature android:name="android.hardware.screen.landscape" android:required="false" /&gt;
  • 我用整个清单更新了问题。那么,我应该尝试添加您提供的代码吗?
  • 是的,试试那个代码,但我不认为没有它会阻止任何事情。我的清单中根本没有任何compatible-screen 标签,它在平板电脑上运行良好,所以我会把它排除在你的清单之外。我还会查看“APK”选项卡上的 Google Play 开发控制台,并确保“排除的设备”框中有 0,也许还可以查看“支持的设备”以查看是否有任何平板电脑。 *编辑:您是上传单个 APK 还是多个?
  • 我正在上传一个 APK。我会试试你的代码。一旦我有一些结果,我会对此发表评论。谢谢!
  • 我按照您的建议检查了排除的设备,没有排除的设备,但是当我检查支持的设备并搜索关键字“平板电脑”时,它只显示了大约 20 台平板电脑。

标签: android xamarin publish tablet


【解决方案1】:

我将发布我所说的所有内容作为答案。我放置这些的顺序与重要性无关。

您不需要使用&lt;compatible-screens&gt;,除非您的应用只能在某些屏幕上运行。

在我的清单中,我添加了以下内容,但您可能不需要这样做:

<uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
<uses-feature android:name="android.hardware.screen.landscape" android:required="false" />

我会查看 Google 开发控制台并确保您没有排除设备,并且可能会查看支持的设备列表中是否有任何平板电脑。如果我搜索“平板电脑”,我有 80 个。

最后,确保您至少检查了以下架构:armeabi-v7ax86armeabi 已弃用,您可以执行其他两个,但我们不这样做,因为我们在发布模式下使用 LLVM 编译,这与 64 位架构不兼容。这样做的好处是,所有 64 位架构仍然可以使用 32 位构建,因此如果您检查这 3 个,它们仍然会被覆盖。

【讨论】:

  • 我接受了答案,因为使用您在 cmets 中提供的节点 以及检查您提到的架构,现在解决了我的问题。我还删除了 节点.. 感谢您的帮助!
  • 很高兴它有帮助!我也在答案中添加了&lt;uses-feature&gt; 标签。
猜你喜欢
  • 2014-08-14
  • 2017-07-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多