我在 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>
除非您的应用程序只能在某些屏幕上运行。
在我的清单中,我添加了以下内容,尽管您可能不需要:
<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-v7a
and x86
. armeabi
已弃用,您可以执行其他两个操作,但我们不这样做,因为我们在发布模式下使用 LLVM 编译,这与 64 位架构不兼容。这样做的好处是,所有 64 位架构仍然可以使用 32 位构建,因此如果您检查这 3 个,它们仍然会被覆盖。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)