Androidmanifest.xml播放三星Galaxy Tab 4系列的商店设置

时间:2014-11-10 08:35:14

标签: android cordova google-play android-manifest

我似乎无法将三星GalaxyTab 4 7.0包含在我的Cordova应用的PlayStore兼容设备列表中,尽管:

  • 仅使用supports-screens,而不是compatible-screens
  • 使用compatible-screens而非supports-screens
  • resizeable=true/falseanyDensity=true/false
  • 的各种组合
  • 删除所有Cordova插件并有效地将所需权限带到接近零
  • 玩弄min-和targetSdkVersion版本,以及Cordova使用的SDK版本
  • 添加所有可能的uses-feature/required=false或者只是那些你觉得有意义的东西(hardware.telephony,因为它是一个没有SIM / WIFI的设备)
  • ^现在包括touchscreenscreen.portrait/landscape
  • 删除强制screenOrientation="portrait"
  • 在兼容屏幕中包含tvdpi/213

(GalaxyTabs< 4虽然兼容)

我错过了什么?

当前AndroidManifest.xml

<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="10200" android:versionName="1.2.0" package="[removed]" xmlns:android="http://schemas.android.com/apk/res/android">
    <supports-screens
      android:anyDensity="true"
      android:largeScreens="true"
      android:normalScreens="true"
      android:resizeable="true"
      android:smallScreens="true"
      android:xlargeScreens="true"
    />
    <application
      android:hardwareAccelerated="true"
      android:icon="@drawable/icon"
      android:label="@string/app_name">
        <activity
          android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
          android:label="@string/activity_name" android:launchMode="singleTop"
          android:name="CordovaApp" android:theme="@android:style/Theme.Black.NoTitleBar"
          android:windowSoftInputMode="adjustResize">
            <!-- Cordova default here -->
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="18" android:targetSdkVersion="21" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-feature android:name="android.hardware.telephony" android:required="false" />
    <uses-feature android:name="android.hardware.camera" android:required="false" />
    <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
    <uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
    <uses-feature android:name="android.hardware.screen.landscape" android:required="false" />
    <!-- With compat-screens added, there'd also be: -->
    <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="213" android:screenSize="small" />
        <screen android:screenDensity="480" 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="213" android:screenSize="normal" />
        <screen android:screenDensity="480" 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="213" android:screenSize="large" />
        <screen android:screenDensity="480" 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" />
        <screen android:screenDensity="213" android:screenSize="xlarge" />
        <screen android:screenDensity="480" android:screenSize="xlarge" />
    </compatible-screens>
</manifest>

----

aapt dump badging app.apk

package: name='[removed]' versionCode='10200' versionName='1.2.0'
application-label:'[removed]'
application-icon-120:'res/drawable-ldpi-v4/icon.png'
application-icon-160:'res/drawable-mdpi-v4/icon.png'
application-icon-240:'res/drawable-hdpi-v4/icon.png'
application-icon-320:'res/drawable-xhdpi-v4/icon.png'
application: label='[removed]' icon='res/drawable-mdpi-v4/icon.png'
launchable-activity: name='[removed].CordovaApp'  label='[removed]' icon=''
sdkVersion:'18'
targetSdkVersion:'21'
uses-permission:'android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission:'android.permission.ACCESS_NETWORK_STATE'
uses-permission:'android.permission.INTERNET'
uses-feature-not-required:'android.hardware.telephony'
uses-feature-not-required:'android.hardware.camera'
uses-feature-not-required:'android.hardware.camera.autofocus'
uses-feature-not-required:'android.hardware.touchscreen'
uses-feature-not-required:'android.hardware.screen.portrait'
uses-feature-not-required:'android.hardware.screen.landscape'
uses-permission:'android.permission.READ_EXTERNAL_STORAGE'
uses-implied-permission:'android.permission.READ_EXTERNAL_STORAGE','requested WRITE_EXTERNAL_STORAGE'
main
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '120' '160' '240' '320'

编辑:更新了清单,添加了aapt转储

----

EDIT2: 它现在 - 莫名其妙地 - 与上述清单(及其变体)一起工作。 必须是黑魔法。

1 个答案:

答案 0 :(得分:0)

我会尝试删除整个兼容屏幕部分。如此处https://developer.android.com/guide/topics/manifest/compatible-screens-element.html所述,您应该仅将此作为最后的手段

修改

在兼容屏幕部分中为大屏幕添加screenDensity =“tvdpi”也可能有帮助。例如,第一代Nexus 7具有tvdpi密度。

其他可能有帮助的是aapt工具,例如

./aapt dump badging YourApp.apk