Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: uses-sdk minSdkVersion being ignored by Play Store?

I built a very simple app that consists of about six activities for showing the details of events at a conference. There's not much to it.

However, I know that the app doesn't work well on devices running anything lower than Android 4.0.3. I set the minSdkVersion to "15" and the targetSdkVersion to "18", but when I upload the apk to the Play Store, it tells me that it will run on anything above 7.

Is there something that I'm missing to restrict the app to run only on 4.0.3 and above?

From the AndroidManifest.xml file. This is inside the <manifest> tag.

What it shows when I publish the app to Google Play, in the Developer Console.

From the Google Play Store listing.

like image 402
Phil Ringsmuth Avatar asked Sep 13 '13 00:09

Phil Ringsmuth


Video Answer


1 Answers

Thanks to a tip on Google+, it appears I found the solution. In the build.gradle file, the values for minSdkVersion and targetSdkVersion can be overridden. I'm assuming that this file is generated based on the manifest, and there's a bug in Android Studio that was putting incorrect values here. This is only an assumption.

The following images show what the build.gradle file was like before I altered it, what it looked like after I altered it, and what the Developer Console shows for this new apk after I uploaded it.

build.gradle file before manual edits.build.gradle file after manual edits.Developer Console after new APK upload.

like image 62
Phil Ringsmuth Avatar answered Sep 27 '22 18:09

Phil Ringsmuth