Search code examples
downloadapklicensingapk-expansion-files

Download failed because you may not have purchased this app - emulator


Dears, My apk expansion is working fine with real devices, but with emulator I get this error

Download failed because you may not have purchased this app

This is the logcat:

BE/Checking_download: expansion not delivered E/Checking_download: try intent E/Checking_download: intented launched E/Checking_download: Category isandroid.intent.category.LAUNCHER E/Checking_download: Start the download service E/Checking_download: initialize activity to show progress , result is: 2 ro.sf.lcd_density must be defined as a build property

[ 04-25 00:08:50.630  8167: 8167 D/         ]

HostConnection::get() New Host Connection established 0x9f4b1d40, tid 8167 E/Checking_download: service_resume :

                  [ 04-25 00:08:50.828  8167: 8190 D/         ]
                  HostConnection::get() New Host Connection established 0xa1fdf2c0, tid 8190

E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824 E/Checking_download: service_to_connected : E/Checking_download: service_connected : E/FA: Discarding data. Failed to send app launch E/FA: Failed to get app instance id E/FA: Failed to send current screen to service E/FA: Discarding data. Failed to send event to service E/Checking_download: DownloadStateChanged : Looking for resources to download E/Checking_download: DownloadStateChanged : Download failed because you may not have purchased this app

Notes:

1-Again app live on google play working fine with real devices.

2-Emulator API version is : google play API-25.

3-Google account is added to emulator. ( logged in with my gmail).

4-Google play services installed.

Thanks in advance.

enter image description here


Solution

  • The answer is very simple, the application version code must be same like uploaded version to google play. i.e ( in build.gradle, app level check

    versionCode 2

    Then you have to confirm from google play that this version is already uploaded and life.