2
votes

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
Why do you use such strange version codes? They are supposed to be simple integers. 1, 2, 3 etc. The version name is where you put your custom version naming. Your codes are way over an SQL small uint (65,535), though I'm not sure what google uses that to store it. - pjco
I use the version code scheme suggested by google at link - yprabhu
This was resolved in an offline conversation. Please update the question here with your resolution or else close it. - Megha Joshi - GoogleTV DevRel
@Yash, thanks for the link and updated solution - pjco

1 Answers

1
votes

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!