How to Update Version Cordova PhoneGap App?

00:35:00 0 Comments




Dear Guys,Joel here from JoelWebsites.com :D in this small post I show you how to update your cordova app version
So how is this tutorial Going to be useful?
When uploading apps this happens during updating the existing app on the playstore we get an error that we need to update the Android Version for the app.

So it is really difficult to update the Version if you do not know what are the steps to done.
After lot of searching online.I finally found the solution.

We need to add android-versionCode="yourappversion" to the config.xml file like below.

Your widget tag code should look like below in the config.xml

Here is just an example

<widget android-versionCode="7" id="com.yourapp.YourApp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

You will find the config file in the following directories in your project folder.I made changes in all the config.xml files to make things simpler.





Later on you will see the manifest file updated like below after the build the android project
Your App directory/platforms/android/AndroidManifest.xml

<manifest android:versionCode="7" android:hardwareAccelerated="true" android:versionName="0.0.1" package="com.yourapp.Yourapp" xmlns:android="http://schemas.android.com/apk/res/android">


if android:versionCode is not available then you will need to add it like shown above.

Moreover , Google playstore may say that the version you need should be greater than 10 whereas you would see it to be set as 1 in your AndroidManifest.xml .So do not worry just increase the number and the rebuild the app and you should be fine...View the other article on how to sign and align the apk file for the playstore here

So once again here is the Golden code to change the app version for your Cordova PhoneGap Project in config.xml

<widget android-versionCode="AppVersion" id="com.yourapp.YourApp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">


So I hope that this tutorial was useful do comment below if you have doubts or questions,Thank you

Check my youtube channel here

Joel

Joel Fernandes,I am a Very Smart,Innovative Creative and One of the Best Webdevelopers.I am an expert in Webdevelopment.My other interest include Cars and Vehicles.My desire is to be the best and serve you with the best information I have .I will always share all my tips and tricks on this website and provide you with the best themes so that your life may be simpler.Keep visiting www.joelwebsites.com for the best website related ,tips and tricks and news.Meet me on FaceBook

0 comments: