我基于谷歌教程和样本开发了一个即时应用程序apk.当我尝试开始生产时,我看到一个错误:
不可升级到已安装的应用
问题
此即时应用APK的某些用户将无法使用您已安装的应用中的任何APK.
解析度
确保您的即时应用APK的定位与您的APK定位相匹配.
项目结构:
有两种情况,第一种:
base – baseFeature,minSdk 18,targetSdk 26
application project(':apk')
feature project(':item-details')
item-details功能 – minSdk 18,targetSdk 26
api project(':base')
ui – 即时模块中不包含的功能,minSdk 18,targetSdk 26,模块包含所有视图
implementation project(':base')
other modules like customcomponents, shared etc
即时即时应用程序模块minSdk 18或23,targetSdk 26
implementation project(':base')
implementation project(':item-details')
apk – apk模块,minSdk 18,targetSdk 26
implementation project(':ui')
implementation project(':shared')
第二种情况在baseFeature中有项目详细信息代码.
即时应用程序从Android Studio和Google Play开发和预发布运行.此外,当我尝试升级到已安装的应用程序时,一切正常.
在我看来,定位是正确的,但谷歌Play控制台的思维方式不同.
您是否知道如何推出即时应用程序?请帮忙 :(
我已经在这个版本上工作了3天,我无法推出应用程序.
更新10.09.2017
APK详细信息:
Supported Android devices 8448 devices
API levels 18+
Target SDK 26
Screen layouts 4 screen layouts
Localizations default + 113 languages
Features 2 features
required permissions 12 permissions
OpenGL ES versions 1.0+
OpenGL textures all textures
Uploaded Sep 9, 2017, 7:57:11 AM PDT
解决方法:
根据Android documentation:
You can use the
aapt
tool, included in the Android SDK, to determine how Google Play will filter your application, based on its declared features and permissions. To do so, runaapt
with thedump badging
command. This causes aapt to parse your application’s manifest and apply the same rules as used by Google Play to determine the features that your application requires.
通过在可安装和即时应用程序上运行该命令,将打印以下信息.
可安装的应用程序(版本551):
package: name='skyesoftware.blogspace' versionCode='551' versionName='0.3.1.551' platformBuildVersionName=''
sdkVersion:'18'
targetSdkVersion:'26'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.RECEIVE_BOOT_COMPLETED'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='com.google.android.providers.gsf.permission.READ_GSERVICES'
uses-permission: name='com.google.android.c2dm.permission.RECEIVE'
uses-permission: name='skyesoftware.blogspace.permission.C2D_MESSAGE'
…
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
uses-feature: name='android.hardware.location'
uses-implied-feature: name='android.hardware.location' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and requested android.permission.ACCESS_FINE_LOCATION permission'
uses-feature: name='android.hardware.screen.portrait'
uses-implied-feature: name='android.hardware.screen.portrait' reason='one or more activities have specified a portrait orientation'
uses-feature: name='android.hardware.wifi'
uses-implied-feature: name='android.hardware.wifi' reason='requested android.permission.ACCESS_WIFI_STATE permission'
…
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--' 'af' 'am' 'ar' 'az' 'az-AZ' 'be' 'be-BY' 'bg' 'bn' 'bn-BD' 'bs' 'bs-BA' 'ca' 'cs' 'da' 'de' 'el' 'en-AU' 'en-GB' 'en-IN' 'es' 'es-ES' 'es-US' 'et' 'et-EE' 'eu' 'eu-ES' 'fa' 'fi' 'fr' 'fr-CA' 'gl' 'gl-ES' 'gu' 'gu-IN' 'hi' 'hr' 'hu' 'hy' 'hy-AM' 'id' 'in' 'is' 'is-IS' 'it' 'iw' 'ja' 'ka' 'ka-GE' 'kk' 'kk-KZ' 'km' 'km-KH' 'kn' 'kn-IN' 'ko' 'ky' 'ky-KG' 'lo' 'lo-LA' 'lt' 'lv' 'mk' 'mk-MK' 'ml' 'ml-IN' 'mn' 'mn-MN' 'mr' 'mr-IN' 'ms' 'ms-MY' 'my' 'my-MM' 'nb' 'ne' 'ne-NP' 'nl' 'pa' 'pa-IN' 'pl' 'pt' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si' 'si-LK' 'sk' 'sl' 'sq' 'sq-AL' 'sr' 'sr-Latn' 'sv' 'sw' 'ta' 'ta-IN' 'te' 'te-IN' 'th' 'tl' 'tr' 'uk' 'ur' 'ur-PK' 'uz' 'uz-UZ' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
densities: '120' '160' '240' '320' '480' '640' '65534'
即时应用基础功能:
package: name='skyesoftware.blogspace' versionCode='1' versionName='1.0.0' platformBuildVersionName=''
sdkVersion:'18'
targetSdkVersion:'26'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='com.google.android.c2dm.permission.RECEIVE'
uses-permission: name='skyesoftware.blogspace.permission.C2D_MESSAGE'
application: label='' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
other-activities
other-receivers
other-services
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--' 'af' 'am' 'ar' 'az' 'az-AZ' 'be' 'be-BY' 'bg' 'bn' 'bn-BD' 'bs' 'bs-BA' 'ca' 'cs' 'da' 'de' 'el' 'en-AU' 'en-GB' 'en-IN' 'es' 'es-US' 'et' 'et-EE' 'eu' 'eu-ES' 'fa' 'fi' 'fr' 'fr-CA' 'gl' 'gl-ES' 'gu' 'gu-IN' 'hi' 'hr' 'hu' 'hy' 'hy-AM' 'in' 'is' 'is-IS' 'it' 'iw' 'ja' 'ka' 'ka-GE' 'kk' 'kk-KZ' 'km' 'km-KH' 'kn' 'kn-IN' 'ko' 'ky' 'ky-KG' 'lo' 'lo-LA' 'lt' 'lv' 'mk' 'mk-MK' 'ml' 'ml-IN' 'mn' 'mn-MN' 'mr' 'mr-IN' 'ms' 'ms-MY' 'my' 'my-MM' 'nb' 'ne' 'ne-NP' 'nl' 'pa' 'pa-IN' 'pl' 'pt' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si' 'si-LK' 'sk' 'sl' 'sq' 'sq-AL' 'sr' 'sr-Latn' 'sv' 'sw' 'ta' 'ta-IN' 'te' 'te-IN' 'th' 'tl' 'tr' 'uk' 'ur' 'ur-PK' 'uz' 'uz-UZ' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
densities: '120' '160' '240' '320' '480' '640' '65534'
即时应用功能APK:
package: name='skyesoftware.blogspace' versionCode='1' versionName='1.0.0' split='blogspace_item_details' platformBuildVersionName=''
sdkVersion:'18'
targetSdkVersion:'26'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
application: label='' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160'
正如您所看到的,您的可安装应用程序请求ACCESS_COARSE_LOCATION和ACCESS_FINE_LOCATION权限,即android.hardware.location功能的implicitly add a requirement.以同样的方式,ACCESS_WIFI_STATE权限暗示了android.hardware.wifi功能.在他们的设备上没有GPS或WiFi的用户(听起来很奇怪,但这些设备在野外存在)将无法将您的即时应用升级到可安装的应用.
还有一个限制你的可安装应用程序可用性的东西是android.hardware.screen.portrait功能,暗示是因为:
one or more activities have specified a portrait orientation
要修复所有这些问题并使即时应用的所有用户都可以使用可安装的应用,请将以下块添加到可安装应用的清单中(位于< manifest>标记下方的级别):
<uses-feature
android:name="android.hardware.location"
android:required="false" />
<uses-feature
android:name="android.hardware.location.network"
android:required="false" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />
<uses-feature
android:name="android.hardware.wifi"
android:required="false" />
<uses-feature
android:name="android.hardware.screen.portrait"
android:required="false" />
android.hardware.location.network和android.hardware.location.gps功能符合以下requirement:
If your app targets Android 5.0 (API level 21) or higher and uses the
ACCESS_COARSE_LOCATION
orACCESS_FINE_LOCATION
permission in order to receive location updates from the network or a GPS, respectively, you must also explicitly declare that your app uses theandroid.hardware.location.network
orandroid.hardware.location.gps
hardware features.
顺便说一句,另一种了解可安装应用程序所需功能的方法是Google Play控制台的应用程序发布部分的APK details信息屏幕.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。