0

Configure multiple APKs for screen densities

But on Some MI devices Like MI 4 and Note 5 pro its automatically rollback to previous version from playstore .

My code for generation multiple density is

 defaultConfig {
        compileSdkVersion 26
        buildToolsVersion '26.0.2'
        minSdkVersion 16
        targetSdkVersion 26

        versionCode 88
    }

    ext.versionCodes = [all: 1, mdpi: 2, hdpi: 3, xhdpi: 4, xxhdpi: 5]
android.applicationVariants.all { variant ->
    variant.outputs.each { output ->
        def key = output.getFilter(OutputFile.DENSITY) == null ? "all" : output.getFilter(OutputFile.DENSITY)
        output.versionCodeOverride = project.ext.versionCodes.get(key)*100000 + android.defaultConfig.versionCode

    }
}

and I have generated previous version code like 1000085,2000085,3000085,4000085 and 5000085

next version will be like 1000086,2000086,3000086,4000086 and 5000086

but on Mi devices its takes random version apk from playstore

maveric
  • 187
  • 2
  • 17

1 Answers1

0

You may refer with this thread. Your app might not be compatible with your device because of the app's size.

Thank you for your note. Currently the maximum file size limit for an app upload to Google Play is approximately 50 MB.

However, some devices may have smaller than 50 MB cache partition making the app unavailable for users to download. For example, some of HTC Wildfire devices are known for having 35-40 MB cache partitions. If Google Play is able to identify such device that doesn't have cache large enough to store the app, it may filter it from appearing for the user.

You may also check this link if it helps: android app automatically downgrade version

Community
  • 1
  • 1
abielita
  • 13,147
  • 2
  • 17
  • 59
  • thanks for reply I just figure out the root of problem it is problem related to Mi device .Mi has released its own playstore(MI playstore for apps) and there is not updated apk so it update on mi devices automatically with previous version of app .I guess we have to ship our apk there also . – maveric Apr 20 '18 at 05:12