1

I am uploading instant APK in playstore and show error "Non-upgradable to installed app". build.gradle have same version name and code in both App and base module.

Problem is some users of this Instant App apk will not be eligible for any of the APK in your installed app.

Instant app try to upload in different version name and code.

instant app

apply plugin: 'com.android.instantapp'

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

base

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

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

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

Resolution show "*Ensure that the targeting of your instant app apks matches the targeting of your apks"

aapt code run

aapt dump badging 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>
Community
  • 1
  • 1
  • https://stackoverflow.com/questions/45975231/google-play-console-error-non-upgradable-to-installed-app – Anksmonani Apr 10 '19 at 13:41
  • Possible duplicate of [Google Play Console error - Non-upgradable to installed app](https://stackoverflow.com/questions/45975231/google-play-console-error-non-upgradable-to-installed-app) – TWL Apr 11 '19 at 23:18
  • don't be confused about the error message, it doesn't have to do with the "version code" – TWL Apr 11 '19 at 23:19
  • 1
    i am follow same as https://stackoverflow.com/questions/45975231/google-play-console-error-non-upgradable-to-installed-app but still give error and added all permission of in installed apk menifest "Problem: Some users of this Instant App APKs will not be eligible for any of the APKs in your installed app. Resolution: Ensure that the targeting of your Instant App APKs matches the targeting of your APKs." – Dholakiya Madhuri Apr 17 '19 at 11:12

0 Answers0