Change package name to existing Phonegap projects Change package name to existing Phonegap projects android android

Change package name to existing Phonegap projects


It would be better if instead of Renaming the .java file and the class name, you just make your changes in:

  • AndroidManifest.xml
  • config.xml

Then remove android support with cordova platform remove android
And then re-add the android support cordova platform add android

This will generate the .java file again with the correct name.

Ref: http://intown.biz/2014/03/07/renaming-a-cordova-application/


As a command above, just 3 steps:

  • Remove platform cordova platform remove android

  • Edit config.xml (main folder) find & replace widget id

<widget id="com.foobar.mynewname" version="1.0.0" android-versionCode="1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">