简体   繁体   English

多个APK,适用于Google TV和Android手机/平板电脑的Play商店上的单个应用列表

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

I have an Android phone/tablet apk which is currently in Play store and has these settings in its manifest file: 我有一个Android手机/平板电脑apk,当前在Play商店中,并且清单文件中包含以下设置:

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: 我已经为GoogleTV上传了另一个apk,该apk与先前的apk具有相同的包名称com.company.xyz,并且在清单文件中具有以下设置:

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 Google TV APK从未出现在GTV盒子上的Play商店中,因此我使用以下设置更新了清单,而所有其他设置均保持不变

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. 此时,尽管GoogleTV apk的版本代码高于手机/平板电脑的版本,但由于Play商店错误“错误:新的APK版本低于以前的APK版本”,我无法保存该应用。 Does anyone have a solution for this? 有人对此有解决方案吗?

Thanks! 谢谢!

These solutions were suggested by the Google TV DevRel team. 这些解决方案由Google TV DevRel团队提出。

I had accidentally added an armeabi folder under libs. 我不小心在libs下添加了一个armeabi文件夹。 This made Google TV play store think that the app uses NDK and the app was filtered out. 这使Google TV Play商店认为该应用程序使用NDK,并且该应用程序已被过滤掉。

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. 并创建更新版本的apk。 Setting all the supports screens attributes was making large devices pick up the wrong apk. 设置所有支持屏幕的属性会使大型设备选择错误的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" 之后,我上传并激活了1203010003,然后停用了旧版本1203010001和1203010002。随后我成功地保存了apk,而没有遇到“错误:新的APK版本低于以前的APK版本”

Hope this helps others! 希望这对别人有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM