Google play: required android version doesn't match manifest minSdk version - android

I published my app to beta in google play.
But in manifest specified another version:
<uses-sdk android:minSdkVersion="10"/>
Anyone else encountered this problem? What could it be?
Update: I extracted the manifest from apk. minSdkVersion in it = 10.
May be it is a feature of beta testing?
Update 2: After publishing app to production "Requires Android" changed to specified in manifest

It's only in alpha and beta testing. I had a similar issue. Later, after promoting it to production, it began showing correct sdk version. So it might be some bug in alpha and beta testing.

Are you using Android Studio?
If that's the case, check your build.gradle file. It also defines a minSdkVersion and overrides the one of your manifest:
apply plugin: 'android'
android {
// ...
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
//...
}
//...
}

The fact that Size and Current Version "vary with device" makes me think you have multiple active APKs. One that perhaps you initially uploaded that supports 1.6, and then the latest one which supports 2.3.3. Go the APKs section for your app in your android dev/publishing console and make sure you only have a single APK "in production".

If you use Android Studio you have to set build.gradle file.
Set your gradle in defaultConfig and retry:
apply plugin: 'android'
android {
// ...
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.01"
}
//...
}

1.add following inside application tag of AndroidManifest.xml
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
2. we can directly add the version code like
<meta-data android:name="com.google.android.gms.version" android:value="4030500" />
4030500 is version code which is stored inside google-play-services_lib>res>values>version.xml
Like
<integer name="google_play_services_version">4030500</integer>
Conclusion: Latest google play services requires a version name, which is to be mentioned using inside AndroidManifest.xml
Note: I would strongly recommend to use 1st way

Related

Restrict app installation for particular version of android

I am working on android app. Can anybody tell me that how can we restrict our app installation in android version less than 4.0 from google play developer console.
This is not set in Google Play developer console, it is set in the project's build gradle.
The setting is in build.gradle file in your application module. There should be something like this.
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
change minSdkVersion to whatever value of sdk you want to support.
Read more here: https://developer.android.com/studio/publish/versioning.html#minsdkversion
And here are the sdk int value for each Android version: https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels
There is no way that I know of to manage that in Developer Console. You should upload binary that was packaged with Minimum Android Version set in AndroidManifest.xml to what ever is the minimum you still want to support (4.0 in your case).
Example:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="14" />
</manifest>
14 is the API Level of Android 4.0.

Update app in Google Play store

I have an app published in the Google Play store. I have updated the design of the icons and want to upload the app with the new changes to the store.
I have read on tutorials that I have to change the app version in the manifest. I have checked my original manifest file, and it does not show the following lines in it.
android:versionCode="2"
android:versionName="1.1">
Can I just add them now to the manifest and upload new apk, even though there is already a published version of the app in the store?
Thanks.
May be your app is developed in Android Studio. In Android Studio, version name and version code are added in the build.gadle (Module App) file instead of AndroidMenifest.xml
You have to add the version detail in your build.gradle like below:
defaultConfig {
applicationId "com.augmedix.www.animatevoice"
minSdkVersion 15
targetSdkVersion 21
versionCode 2
versionName "1.1"
}
Just check your AndoridManifest.xml. Inside this file there must be a mainfest tag. In this tag there are two attributes
1). android:versionCode
2). android:versionName
Here every time when you update your app its mandatory to increase the VersionCode but its optional to increase the VersionName.
Also, if you are using AndroidStudio, you can check the answer given by #Arman.
Hope it will help you.
Thanks
If you're developing on Android Studio goto build.gradle (Module app) file and change the versionCode and versionName(optional). And then sync project and generate signed apk with existing keystore and upload to production in play store.

Cant find `uses-sdk` in Android Studio 0.8.2

I started to learn android using Android Studio 0.8.2 and I started a new project with the minimum API as 15. But in my AndroidManifest.xml, doesn't appear the uses-sdk tag.
Do I have to insert it by myself? Shouldn't the project create it? Or is Android Studio different and is no longer necessary to insert this in manifest, only in the build.gradle?
Thank you in advance :)
The default template in Android Studio is ready to work with gradle.
If you check your project you will find a build.gradle file inside your app module.
Here you can find something like this:
defaultConfig {
applicationId 'xxxx'
minSdkVersion 15 //your minSdk
targetSdkVersion XX //your targetVersion
versionCode 0
versionName '0.1.0'
}
Gradle building the project will override the uses-sdk tag in your Manifest.
Yes, add it manually.
Android studio uses build.gradle to build the project so it doesn't care about the manifest, and that's probably why it doesn't insert it in it. However, it is important to have it in the manifest, for when you publish the app, as Google play uses this for filtering the devices.

Setting maximum TargetSDK for the apk

I have a app on the Google Play with the following configuration. Till now I thought that Google Play uses AndroidManifest to determine the minimum and the maximum SdkVersion. Unfortunately as it reveals people could download and install this app on higher APIs.
The question is; how to set maximum API limit for this app (I guess I need to set compileSdkVersion 17 in build.gradle but I have to be sure) before publish the apk.
AndroidManifest.xml (an extract):
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="17" />
build.gradle (an extract):
android {
compileSdkVersion 19
//...
}
You are setting targetSdk Version and minSdkVersion
maxSDK Version is a different attribute.
but is discouraged to set it
heres the full version of the code, from developer.android.com
<uses-sdk android:minSdkVersion="integer"
android:targetSdkVersion="integer"
android:maxSdkVersion="integer" />
As the Google play store indirectly choose the version ,after upload of the apk it looks after our android manifest.xml from there it takes all the information like minsdkversion and maxsdkversion in that manner our app will support based on that values it contain..

In IntelliJ, how to set the Android API level

I'm using the latest and greatest IntelliJ Community edition. My application runs fine on the android emulator. However, I need the emulator to better match the Kindle Fire. I made the configuration changes in the AVD Manager (including setting device to API 10.)
When I went to my project to configure the project to target the new virtual device, I got the following message: "Build target of AVD DEV3 is not compatible with your build target."
It didn't take much work to figure out that the issue is related to my choice of API 10.
I don't know where I tell my project to use API 10. I looked all over and didn't see any references to the API level at all. Any ideas?
EDIT
I added
<uses-sdk android:minSdkVersion="10" />
to my AndroidManifest.xml file and was able to select the new device. I'm starting it up now.
The answer above is no longer true in Intellij (using gradle)
Now <uses-sdk> is ignored in the AndroidManifest.xml, it is automatically added to the built manifest file. To change the version, go to the 'build.gradle' file and look at the minSdkVersion.
As Tony and Blundell mention, the answer is to declare your minSdkVersion in your AndroidManifest.xml file. In this way, the application will be allowed to launch on any AVDs that at least meet the minSdkVersion.
Here's more documentation on the <uses-sdk> tag:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
Set this value in the Gradle file - as shown here:
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.kotlinconverterapp"
**minSdkVersion 26**
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Categories

Resources