Installation error: INSTALL_FAILED_OLDER_SDK - android
I am new to Android development and I want first to get the Hello World application running.
I am using Eclipse IDE and the Android 4.0.3 version 15 SDK. I copied everything from a tutorial site, but when I try to run the application on the virtual device I get this error:
[2012-02-01 11:31:23 - Android_test] Installation error: INSTALL_FAILED_OLDER_SDK
[2012-02-01 11:31:23 - Android_test] Please check logcat output for more details.
[2012-02-01 11:31:23 - Android_test] Launch canceled!
Here is my class in the com.maze.app package:
package com.maze.app;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HelloAndroid extends Activity{
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
}
}
and the AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.maze.app"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="#string/app_name"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity android:name="HelloAndroid" android:launchMode="standard" android:enabled="true"></activity>
</application>
Here is the configuration of the Virtual Device:
Name: AndroidVD
CPU/ABI: ARM(armeabi-v7a)
Path: path\to\avd
Target: Android 4.0.3(API level 15)
Skin: WVGA800
hw.lcd.density: 240
hw.cpu.model: cortex-a8
vm.heapSize: 48
hw.ramSize:512
What is the problem?
EDIT:
The application is not running on the Virtual Device:
Here is what I get on LogCat(some of the lines):
D/PackageManager(92): New package installed in /data/app/com.maze.app-2.apk
D/dalvikvm(92): GC_CONCURRENT freed 660K, 9% free 11935K/12999K, paused 18ms+72ms
I/ActivityManager(92): Force stopping package com.maze.app uid=10040
D/BackupManagerService(92): Received broadcast Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.maze.app flg=0x10000010 (has extras) }
V/BackupManagerService(92): updatePackageParticipantsLocked: com.maze.app
It is due to android:targetSdkVersion="#string/app_name" in your manifiest file.
Change it to:
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15"/>
The targetSdkVersion should be an integer, but #string/app_name would be a string. I think this causing the error.
EDIT:
You have to add a default intent-filter in your manifiest file for the activity. Then only android can launch the activity. otherwise you will get the below error in your console window.
[2012-02-02 09:17:39 - Test] No Launcher activity found!
[2012-02-02 09:17:39 - Test] The launch will only sync the application package on the device!
Add the following to your <activity> tag.
<activity android:name="HelloAndroid" android:launchMode="standard" android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
This means the version of android of your avd is older than the version being used to compile the code
This error occurs when the sdk-version installed on your device (real or virtual device) is smaller than android:minSdkVersion in your android manifest.
You either have to decrease your android:minSdkVersion or you have to specify a higher api-version for your AVD.
Keep in mind, that it is not always trivial to decrease android:minSdkVersion as you have to make sure, your app cares about the actual installed API and uses the correct methods:
AsyncTask<String, Object, String> task = new AsyncTask<String, Object, String>() {
#Override
protected Boolean doInBackground(String... params) {
if (params == null) return "";
StringBuilder b = new StringBuilder();
for (String p : params) {
b.append(p);
}
return b.toString();
}
};
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,"Hello", " ", "world!");
} else {
task.execute("Hello", " ", "world!");
}
Using the android-support-library and/or libraries like actionbar-sherlock will help you dealing especially with widgets of older versions.
I am using Android Studio 0.8.1. I have a project's gradle file like below:
android {
compileSdkVersion 19
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.omersonmez.widgets.hotspot"
minSdkVersion 15
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
My emulator was android 4.0.
So i modified my emulator and made api level 4.0.3(apilevel 15).
It worked.
I tried all the responses described here but my solution was changing inside my build.gradle file minSdkVersion from 8 to 9 because some libraries in my project can´t work with API 8, that´s was the reason for the message INSTALL_FAILED_OLDER_SDK:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.tuna.hello.androidstudioapplication"
minSdkVersion 9
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
...
...
...
In my case I edited a project having this in the AndroidManifest.xml file, and which was ginving me the above error, at runtime:
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
What I did just, was to change minSdkVersion="17", to minSdkVersion="16". My resulting tag was:
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="17" />
Now I'm not getting the error anymore..
Hope this helps
Received the same error , the problem was difference in the version of Android SDK which AVD was using and the version in AndroidManifest file. I could solve it by correcting the
android:minSdkVersion="16"
to match with AVD.
You will see the same error if you are trying to install an apk that was built using
compileSdkVersion "android-L"
Even for devices running the final version of Android 5.0.
Simply change this to
compileSdkVersion 21
Fix for new Android 6.0 Marshmallow
Fixed my issue when I updated to API 23 (Android 6.0 Marshmallow) by updating the build tools version to 23.0.0 as follows:
android {
buildToolsVersion '23.0.0'
...
And went to File > Project Structure , chose Properties tab then updated the Compile Sdk version to "API 23: Android 5.X (MNC)" and the Build tools version to "23.0.0"
I am on Android Studio. I got this error when min/targetSDKVersion were set to 17. While looking thro this thread, I tried to change the minSDKVersion, voila..problem fixed. Go figure.. :(
android:minSdkVersion="17"
android:targetSdkVersion="17" />
Make sure to check your build.gradle and that it doesn't use a newer SDK version than what is installed on your AVD. That's only if you use Android Studio though.
My solution was to change the run configurations module drop-down list from wearable to android. (This error happened to me when I tried running Google's I/O Sched open-source app.) It would automatically pop up the configurations every time I tried to run until I changed the module to android.
You can access the configurations by going to Run -> Edit Configurations... -> General tab -> Module: [drop-down-list-here]
I found that making the recommended change in the manifest didn't solve my problem.
The fix was found in the GradleScripts folder, in the build.gradle file for the Module:app.
Inside this file (build.gradle) the following line was modified.
minSdkVersion 22
I changed this '22' value to '19' for my particular phone and the build completed without error.
Mate, my advice is to change virtual device. Download "Genimotion" application, its easy to use and there are a lot of any devices you need
Go in your project's build.cradle file and add
defaultConfig {
minSdkVersion versions.minSdk
}`
This makes it that your application conforms to the minimum SDK your device is running.
In our case using Flutter, some of our plugins required minimum API level 23 (Android 6.1) due to which several old devices could not install our app . For example, a Huawei Android 5.1 device could not install the app as the Flutter project's several plugins demanded minimum API 23 or Android version 6.1 .
To make a solution in such a case:
Either, remove those plugins to make your app compatible with old phones
Or, keep using high-API-required Flutter plugins that may lose old-device users .
If you are totally new like me, you must install the minimum SDK at first. Check the link.
This worked out perfectly for me:
Same problem other post with a good solution
Ionic Android emulator error INSTALL_FAILED_OLDER_SDK
So, basically it means that the installation has failed due to having an older SDK version than the targetSdkVersion specified in your app (it's a Gradle issue).
Just edit the AndroidManifest.xml file and add the following code:
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="14"/>
After days looking for the solution, that's it.
Works fine for me!
If the error "Installation error: INSTALL_FAILED_OLDER_SDK" appears, you must change the version of minSdkVersion in AndroidManifest to the one specified in the android emulator: see Settings -> About phone -> Android version.
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.2/knockout-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/5.7.0/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="14"/>
I've changed my android:minSdkVersion and android:targetSdkVersion to 18 from 21:
uses-sdk android:minSdkVersion="18" android:targetSdkVersion="18"
Now I can install my app successfully.
Related
Version code 1 has already been used. Try another version code
I am uploading new app bundle to play console and it is saying after uploading Version code 1 has already been used. Try another version code. I have changed version number in pubspec.yaml from version number: 1.0.0+1 to 2.0.0+1 even though it is saying the same error
You have two ways to solve this, if you released your bundle already, then you have to update your version code like in Len_X's answer, If you're still developing and pushed app bundle for say, testing, and then you delete it, this bundle is saved as a draft with that version code. Therefore, it says that you can't use the same version because it already sees another one with the same version name. Here's how you fix it: Go to the release section go to app bundle explorer, in the top right you should see a dropdown button for you app version, click on it. A bottomsheet will show containing all the previous app bundles you uploaded it. Delete the one with clashing bundle version and you're good to go. Hope that solves your problem.
You can do it manually by going to "app_name/android/app/build.gradle" file. In defaultConfig section change version code to a higher number defaultConfig { applicationId "com.my.app" minSdkVersion 23 targetSdkVersion 30 versionCode 1 // Change to a higher number versionName "1.0.1" // Change to a higher number testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/schemas".toString()] } } }
First go to the app/build.gradle change versionCode and versionName like this (+1) I think this will be helpful for someone ✌😊
For Flutter only: Goto Pubspec.yaml file and find version key and Change the value after the + sign. For Example: In your pubspec.yaml file, if your version is like this version: 1.0.0+1 then change it to version: 1.0.0+2
You have to increment the +1, it should be +2 to indicate build number
if you remove apk then upload same version apk so you get Error Version code 1 has already been used. Try another version code in this situation you should remove version from App bundle explorer then upload same version apk.
If you're running into app bundle approval issues inside of the Google Play store with an Expo/React Native project, here are some tips: Google Play versioning is actually checking your AndroidManifest.xml file for versioning (/android/app/src/). This should get updated from Expo's app.json file (/app.json) during build, per their instructions. app.json example section, where I've bumped my app up to a v2.0 - note the versionCode inside of the Android settings object AND the version at the settings object root both need to be adjusted: { "name": "app-name", "displayName": "App Name", "expo": { "android": { "package": "app.here", "permissions": [], "versionCode": 2 } }, "version": "2.0.0" } If your Android version isn't updating (possibly if you have a detached Expo app), you have to go directly into the AndroidManifest.xml file and make the modification there (/android/app/src/): Example of AndroidManifest.xml (note your modifications happen on the <manifest> tag, using the android:versionCode and android:versionName: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.aganashapp" android:versionCode="2" android:versionName="2.0" > <uses-permission android:name="android.permission.INTERNET"/> <application android:name=".MainApplication" android:label="#string/app_name" android:icon="#mipmap/ic_launcher" android:allowBackup="false" android:theme="#style/AppTheme" > <meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/#username/app-name" /> <meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="42.0.0" /> <meta-data android:name="expo.modules.updates.EXPO_RELEASE_CHANNEL" android:value="default" /> <activity android:name=".MainActivity" android:label="#string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="#style/Theme.App.SplashScreen" > <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/> </application> </manifest> If you're still having issues, remember that Android versionCode and versionName are two different things. Android does not seem to recognize semver standards. versionCode increments as whole numbers (ie, if you went from semver v1.0.0 to v1.1.0 that is versionCode 1 to 2.
with my flutter project building a release for android i faced the same issue. all was doing is change version code in Pubspec.yaml but did not seem to change my android version... so i went to Android folder and added version code manually in local.properties file : /project/android/local.properties flutter.versionName=1.1.0 flutter.versionCode= from 1 to 4
I always used to increment version code in my android/app/build.gradle file, and it always used to work. Then, after a recent update in Android Studio, it suddenly didn't anymore, and I got this error! I never cared to dig into the build.gradle code, but now, I did. Here, at the "TODO", is where I used to change the version code number: def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '19' // TODO: ---Count up with each release } But that only works if the version code from the local.properties file comes back as "null"!... I just realized. So probably, all this time, my compiler never managed to get values from local properties, but now all of a sudden, it does! So I found the android/local.properties file and tried changing the version code there: sdk.dir=C:\\Users\\karol\\AppData\\Local\\Android\\sdk flutter.sdk=C:\\src\\flutter flutter.buildMode=release flutter.versionName=1.0.0 flutter.versionCode=1 //Change this to 19 (my current version code number) But that didn't work, because the moment I ran flutter build appbundle, this file changed itself back to the original values... I then tried adding version code values to my AndroidManifest.xml file, according to serraosays' answer, but that didn't help me either. Functioning work-around In the end, I did this in the android/app/build.gradle file: def flutterVersionCode = localProperties.getProperty('flutter.versionCode') //if (flutterVersionCode == null) { flutterVersionCode = '19' // TODO: ---Count up with each release //} That is, I commented out the condition. Now, my setting would over-write any value retrieved from the local.properties file. If anyone can tell me the proper way to increment the version code number, I'm all ears! 🙂 But in the meantime, this worked for me, and hopefully for someone else as well.
If you get the above error in the google play console, please change the version: in pubspec.yaml. Reference. How to set build and version number of Flutter app and me works
The first step change the version code The second step go to the other settings and change the bundle version code as well
There are two reasons for this error: First, is common given in other answers: you must increase the version number to send an update to Play Console. Eg. previous app version: 1.0.5+5 and next update must contain 1.1.2+6. The +6 must be next to the previous update present on your play console. Second reason for this error is you have skipped some numbers in between. Eg. Previous released version: 1.0.5+5 but the new version you are trying to release is 1.0.6+8. The +8 is not allowed directly, you must put +6 then +7 and then next numbers.
In unreal engine you can change this in project settings. Steps are as follows. (Me I'm using UE4.27.2) Step 1: Open Project Settings Step 2: Click all settings and in the top search bar type in "version" Without Quotes. Step 3: Scroll down to >Platforms>Android>apk packaging Step 4: Change the store Version for each +1 what you already have APK PAckaging (You do not need to change version display name but you can if you want to this can be edited later on in google console)
change version code here please check the imageenter image description here
Versioning works the other way around. Do not update the pubspec.yaml manually. See the default comment in the pubspec.yaml: # Both the version and the builder number may be overridden in flutter # build by specifying --build-name and --build-number, respectively. So you should run flutter build appbundle --build-name 2.0.0 --build-number 2 This updates the pubspec.yaml for you.
For hybrid apps/JavaScript based frameworks like Ionic or Flutter updating package.json is not enough you sometimes, can directly edit build.gradle file in the build folder. versionCode 2 versionName "2.0" This is not a good practice
Issue running more than one NativeScript application on the same android device with tns run
NativeScript 2.0.0, Windows 10 When trying to run more than one NativeScript application on the same android device the tns run android command stops with message: Successfully deployed on device with identifier '192.168.99.100:5555'. The application is not installed. After some investigation, I tried to install the app on the android device using adb directly: adb "-s" "192.168.99.100:5555" "install" "-r" "<path to apk>.apk" The command responds with the following: 961 KB/s (15394490 bytes in 15.642s) WARNING: linker: /system/lib/libhoudini.so has text relocations. This is wasting memory and prevents security hardening. Please fix. pkg: /data/local/tmp/<app name>-debug.apk Failure [INSTALL_FAILED_CONFLICTING_PROVIDER] After some investigation on INSTALL_FAILED_CONFLICTING_PROVIDER and found the following links: https://issues.apache.org/jira/browse/CB-10014 https://code.google.com/p/analytics-issues/issues/detail?id=784 Install shows error in console: INSTALL FAILED CONFLICTING PROVIDER I can say it's an ugly problem. Researching some more, in the NativeScript project, in the directory \platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-measurement\8.4.0 directory there is a manifest template that contains: <provider android:authorities="${applicationId}.google_measurement_service" android:name="com.google.android.gms.measurement.AppMeasurementContentProvider" android:exported="false"/> But applicationId is never defined, so when more than one app with this provider is added, the second one fails to install.
I have multiple NS apps installed on my phone and emulators; however when you create a new app; check to see if somehow you have ended up with the same internal name. (This can easily happen if you duplicate your prior project) Open up your main/primary package.json file that resides in the outermost root of your project folder. Inside this package.json file you should have a key: "nativescript": { "id": "org.nativescript.test3", "tns-android": { "version": "2.0.0" } }, The "id" is the underlying name of the app that will be installed on the phone. In this case; this is the awesome "org.nativescript.test3" project. If you get duplicate id's then the the app will overwrite the each other when deployed. There is a second reason this can happen, and the actual cause of this issue was figured out by the author of the question also. But I will stick here for any future people who might run into this so that we have a valid answer. The author was using Google Play Services plugin, it has a AppMeasurementContentProvider that if you don't have a applicationId set in your configuration it will default to a blank id; which then means it will conflict with any other app that is using GPS that also doesn't have a applicationId set. The real nastyness of this bug is that it will conflict with ANY app from ANY other developer who also left their applicationId blank. And so then only ONE of the apps would be installable; any other app that has a blank applicationId would not be installable on that device. The solution is to open up your /app/App_Resources/Android/app.gradle file and we will add a new value to it. The current version as of NativeScript v2.00 looks something like this: android { defaultConfig { generatedDensities = [] } aaptOptions { additionalParameters "--no-version-vectors" } } If you recall the first part of this answer and about duplicate ids; the package.json we referenced gives you the name you want to use. So in my case I would add to the defaultConfig { applicationId = "org.nativescript.test3" } So the final file should look something like this: android { defaultConfig { generatedDensities = [] applicationId = "org.nativescript.test3" } aaptOptions { additionalParameters "--no-version-vectors" } } This is related to: Install shows error in console: INSTALL FAILED CONFLICTING PROVIDER https://code.google.com/p/analytics-issues/issues/detail?id=784
This workaround worked for me: in the app/App_Resources/Android/AndroidManifest.xml file add: <provider tools:replace="android:authorities" android:name="com.google.android.gms.measurement.AppMeasurementContentProvider" android:authorities="MY_APPLICATION_ID.gms.measurement.google_measurement_service" android:exported="false" /> Where MY_APPLICATION_ID is the application's package (put it manually because __PACKAGE__ didn't work) Don't forget to declare de tools namespace: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="__PACKAGE__" ...>
Changes Needed after changing package structure of android project?
I am doing one android project in android studio,previously it was working totally fine in Genymotion as well as in actual Mobile phone. But later when it was needed , I changed my package structure,I made related changes in AndroidManifest.xml and build.gradle.Still after that,it was running perfectly on Genymotion but when I tried running it on mobile phone,it is showing error Waiting for device. Target device: samsung-gt_b5330-4d000ef10dee7f00 Uploading file local path: F:\AppName\app\build\outputs\apk\app-debug.apk remote path: /data/local/tmp/com.aaa Installing com.aaa DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.aaa" pkg: /data/local/tmp/com.aaa Failure [INSTALL_FAILED_OLDER_SDK] for example let me tell you how old package was for some classes com.aaa.bbb.ccc.ddd so my common package for all activity was com.aaa.bbb mean all other packages was under this package so my R package was com.aaa.bbb.R but then added some data under com.aaa package so my new common package became com.aaa because of that new R position became com.aaa.R because of that I changed import com.aaa.R in all classes also i changed in AndroidManifest.xml to <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.aaa" > (previously it was package="com.aaa.bbb") also changed in build.gradle to defaultConfig { applicationId "com.aaa" //previously it was applicationId "com.aaa.bbb" minSdkVersion 16 targetSdkVersion 21 versionCode 1 versionName "1.0" } so where else I should make changes ?
The package name on the device must be unique, and there is a conflict when you try to install OVER the existing APK (that is what this means: "Failure [INSTALL_FAILED_OLDER_SDK]") You should completely delete the old APK from your device, and you will be able to install the new version.
Platform MNC is a preview and requires application manifest to set minSdkVersion to 'MNC'
I have this error in my console. [2015-06-03 15:29:11 - MainActivity] Platform MNC is a preview and requires application manifest to set minSdkVersion to 'MNC' [2015-06-03 15:29:12 - debug] Platform MNC is a preview and requires application manifest to set minSdkVersion to 'MNC' and the manifest is like <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" /> how can i resolve this error?
IF you are trying to implement any project for Android M developer preview, You need to set minSDKVERSION ="MNC".
If you want to test the new api in Android M(preview), you have to do that. But if you don't need, change your build target to other version. In Eclipse, Properties -> Android, select target other than Android M (Preview)
Platform MNC is a preview and requires application manifest to set minSdkVersion to 'MNC'so you should try SDK INT OF MNC <uses-sdk android:minSdkVersion="22" android:targetSdkVersion="22" /> In projects Properties -> Android You have to choose other than Android-M, In above example Android 5.1.1, because they have the same API number - API-22 refer this: Platform L is a preview and requires application manifest to set minSdkVersion to 'L'
I'm not sure if you already resolved this issue or not, but all you need to do is this: <uses-sdk android:minSdkVersion="MNC" android:targetSdkVersion="MNC" />
Error with updating new APK on the developer's console
I have been trying to update my app with the new version and I run into this problem on the developers console. I have such error: I checked with the version of my previous version to see if I was doing something wrong, but it was the same. Here is my updated xml file <application android:allowBackup="true" android:id="#+id/title" android:icon="#mipmap/iron" android:label="#string/app_name" android:theme="#style/AppTheme" android:versionCode="100" android:versionName="2.0" >
Looks like you already have version 1. in the play store. To be able to update it, you need to change the version number in the build.gradle file in your android project. Sync your project, then generate the new APK. I doubt if just updating the manifest will work.
In order to define your app version dynamically, specify a custom method with def and call it, as such in your .gradle: def computeVersionName() { return "2.0" } android { compileSdkVersion 19 buildToolsVersion "19.0.0" defaultConfig { versionCode 12 versionName computeVersionName() minSdkVersion 16 targetSdkVersion 16 } }