How to change Version Code (Android)?

You must Login before you can answer or comment on any questions.

I tried manually modifying Version in AndroidManifest XML, and also tried to change it in Titanium Edit tab (Version:), but Google Android Market still complains about Version as it sees as same Version Code 1 all the time.

— asked 4 years ago by Ashok Patel
1 Comment
  • Im having this issue to. It seems the manifest file is not being updated - seems odd that this is still happening a year on.

    — commented 3 years ago by Matt Bourne

8 Answers

Accepted Answer

You Need to bump both android:versionCode and android:versionName

<manifest xmlns:android="" package="com.appcelerator.aidori" android:versionCode="5" android:versionName="1.4" >

— answered 4 years ago by Tony Guntharp
answer permalink
  • That didnt really work for me by adding it into the tiapp.xml file. But just using my own manifest file worked. Check out this doc:

    — commented 4 years ago by garland k

  • For info... it worked for me (SDK 3.0.2) - Thanks Tony.

    — commented 2 years ago by Osian Evans

  • Is there any particular reason it doesn't auto populate this with the version element from tiapp.xml as would be expected? Does anyone know if there are plans for this? It really doesnt make any sense that it doesnt..

    — commented 2 years ago by Joshua Austin

Hey guys, technically there are a hybrid of answers above to make a working solution but it is in-fact possible to just edit the tiapp.xml file.

The initial code of line reads:

<android xmlns:android=""/>
what you need to replace it with is:
<android xmlns:android="">
   <manifest android:versionCode="101" android:versionName="1.0.1"/>
versionCode must be an integer and versionName should be a float or integer.

I solved it :)

Just create a folder called "platform" and within a folder called "android" in your project folder (together with other folders like build, resources etc.). And copy the "AndroidManifest.xml" file from the build\android folder in there and modify the versioncode to 2,3,4,5,6,7 etc. and version name to 1.1, 1.2, 1.3 etc.

Best regards, Darius

using mobile sdk 1.7.2 and even when I set both android:versionCode and android:versionName -- the displayed versions is ALWAYS "1"

— answered 4 years ago by Brian Dittmer
answer permalink
1 Comment
  • Was this ever solved? I'm having the exact same problem where the version code always reverts back to 1.

    — commented 4 years ago by Eve Andersson

what's the proper location/syntax for these declarations in the tiapp.xml?

currently I have them inside of the <android> tag

<android> android:versionCode="1.1.1" android:versionName="Test" </android>

— answered 4 years ago by Brian Dittmer
answer permalink
  • should have read inside the android tag


    — commented 4 years ago by Brian Dittmer

  • so per this closed ticket

    I've tried:

    <android >
    <manifest android:versionCode="1.1.1" android:versionName="Robo"/>
    But it generates this error during the build - [ERROR] F:\Titanium Studio Workspace\ServiceTest\build\android\AndroidManifest.xml:1: error: Error: String types not allowed (at 'versionCode' with value '1.1.1').

    — commented 4 years ago by Brian Dittmer

  • it....after reading

    versionCode has to be an integer (and this is what your app is known by)

    VersionName is what the user sees when they look at version in settings etc

    — commented 4 years ago by Brian Dittmer

Hi I wonder does Titanium studio support all the old version of android and IOS and I also want to know if I packaged the application what I made, does the application can open or expand with eclipse then repackaging is alright?

You Can Change only Version name and it can be fractional but version code should be integer and do not use previous used version code with newly updated apk For eg android:versionCode="14" android:versionName="1.1"

in some cases make sure you don't have <manifest> tag after that tag you used to for example

<android xmlns:android="">
   <manifest android:versionCode="2" android:versionName="1"/>
<manifest >
   <application android:theme="@style/Theme.mytheme" android:icon="@drawable/appicon" />
DONT DO USE PREVIOUS CODE ! in this case second manifest will override first one and titanium builder won't be able to see versioncode number

the correct form is

<android xmlns:android="">
   <manifest android:versionCode="2" android:versionName="1" >
     <application android:theme="@style/Theme.mytheme" android:icon="@drawable/appicon"/>

Your Answer

Think you can help? Login to answer this question!