2

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!

yprabhu
  • 199
  • 2
  • 9
  • 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 Sep 17 '12 at 23:32
  • 2
    I use the version code scheme suggested by google at [link](http://developer.android.com/guide/google/play/publishing/multiple-apks.html#VersionCodes) – yprabhu Sep 18 '12 at 01:33
  • This was resolved in an offline conversation. Please update the question here with your resolution or else close it. – Megha Joshi - GoogleTV DevRel Sep 18 '12 at 04:11
  • @Yash, thanks for the link and updated solution – pjco Sep 18 '12 at 16:22

1 Answers1

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!

yprabhu
  • 199
  • 2
  • 9
  • Are you sure removing "false" attribute value for normalscreens, smallscreens and xlargescreens is a good idea? When you upload the apk and activate/publish it, do you really see the right value under "Supported screens" sections? – VJ Vélan Solutions Dec 06 '12 at 02:07
  • Sorry, I missed this question. At that point, I did see the right values under 'Supported screens' section but after the Google Play store v2 update on April 15th, this was no longer the case. See related question: [link](http://stackoverflow.com/questions/15773071/android-app-cannot-be-updated-on-new-version-of-play-store-due-to-configuration) – yprabhu Jun 28 '13 at 15:58