Multiple apks, single listing of app for Google TV and Android Phone/Tablet on Play Store

那年仲夏 提交于 2019-12-22 17:45:36

问题


I have an Android phone/tablet apk which is currently in Play store and has these settings in its manifest file:

package="com.company.xyz"
android:versionCode="0803010008"
android:versionName="01.00.08" >

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

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<uses-library
    android:name="com.adobe.flashplayer"
    android:required="true" />

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

<uses-feature
    android:name="android.hardware.touchscreen"
    android:required="true" />

I had uploaded another apk for GoogleTV which has the same package name com.company.xyz as the previous apk and has the following settings in its manifest file:

package="com.company.xyz"
android:versionCode="1203010001"
android:versionName="01.00.01" >

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

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

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

<uses-feature
    android:name="com.google.android.tv"
    android:required="true" />

<supports-screens
    android:largeScreens="true"/>

<uses-configuration android:reqFiveWayNav="true" />

The Google TV apk never showed up on Play Store on GTV boxes, so I updated its manifest with the settings below and with everything else remaining the same

package="com.company.xyz"
android:versionCode="1203010002"
android:versionName="01.00.02" >

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

At this point, I am unable to save the app because of the Play Store error "Error: New APK version is lower than previous APK version" even though the GoogleTV apk has a higher version code than the Phone/Tablet version. Does anyone have a solution for this?

Thanks!


回答1:


These solutions were suggested by the Google TV DevRel team.

I had accidentally added an armeabi folder under libs. This made Google TV play store think that the app uses NDK and the app was filtered out.

Another change I had to make was to replace

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

with

<supports-screens android:largeScreens="true"/>

and create a newer version of the apk. Setting all the supports screens attributes was making large devices pick up the wrong apk.

Following this, I uploaded and activated 1203010003 and then deactivated the old versions 1203010001 and 1203010002.I was then able to successfully save the apk without encountering the "Error: New APK version is lower than previous APK version"

Hope this helps others!



来源:https://stackoverflow.com/questions/12467464/multiple-apks-single-listing-of-app-for-google-tv-and-android-phone-tablet-on-p

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!