上传即时应用程序时“无法升级到已安装的应用程序”

时间:2019-04-10 13:04:48

标签: android android-instant-apps

我正在Playstore中上传即时APK,并显示错误“无法升级至已安装的应用” build.gradle在App和基础模块中具有相同的版本名称和代码。

问题是此Instant App apk的某些用户将无法使用已安装应用中的任何APK。

即时应用尝试上传不同的版本名称和代码。

即时应用

apply plugin: 'com.android.instantapp'

defaultConfig {
minSdkVersion 23
targetSdkVersion 28
versionCode 40
versionName "2.0"
implementation project(':base_app')
}

基本

apply plugin: 'com.android.feature'
baseFeature true

defaultConfig {
...
versionCode 40
versionName "2.0"
}
application project(":app")

应用

apply plugin: 'com.android.application'
defaultConfig {
...
versionCode 1000
versionName "2.0"
}

app AndroidMenifest:

<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" />

解决方案显示“ *确保您的即时应用apk的定位与您的apk的定位相匹配”

运行aapt代码

aapt转储标记base_app-release.apk

package: name='com.app.blitz' versionCode='50' versionName='1.9.9' 
compileSdkVersion='28' compileSdkVersionCodename='9'
sdkVersion:'18'
targetSdkVersion:'28'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.CAMERA'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
application-label:'Instant app'
application-icon-120:'res/drawable/blitz_hd_png.png'
application-icon-160:'res/drawable/blitz_hd_png.png'
application-icon-240:'res/drawable/blitz_hd_png.png'
application-icon-320:'res/drawable/blitz_hd_png.png'
application-icon-480:'res/drawable/blitz_hd_png.png'
application-icon-640:'res/drawable/blitz_hd_png.png'
application-icon-65534:'res/drawable/blitz_hd_png.png'
application: label='Instant app' icon='res/drawable/blitz_hd_png.png'
uses-library-not-required:'org.apache.http.legacy'
feature-group: label=''
uses-feature: name='android.hardware.camera'
uses-implied-feature: name='android.hardware.camera' reason='requested
android.permission.CAMERA permission'
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'
other-activities
other-services
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '120' '160' '240' '320' '480' '640' '65534'</code>

0 个答案:

没有答案