Skip to content

Update Package Name to Release on Playstore

Chirag Gupta edited this page Apr 10, 2019 · 6 revisions

Update Package Name to Release on Playstore

This is a step by step guide for those who are willing to rename package so as to release the app on the Playstore.

  1. First open the settings dropdown in the Project Structure View. Uncheck Compact Middle Packages, if not done already.

  1. You can individually edit the folder name which in turn will automatically change the package name in all files of the project. For editing a folder name, you have to click on it and then press Shift + F6 or alternatively you can right click on the folder, go to Refactor and then Rename.

Note: If you get warning that Multiple directories correspond to package, then click on Rename Package.

  1. It will again ask for the confirmation after checking the usages, just click on Do Refactor. Now, wait for sometime as it renames the package.

  2. Go to res -> layout -> fragment_client_accounts.xml and at the end of the file there is a declaration of Floating Action Button, in that there is a property named app:layout_behavior (Line 34), there you have to change the package name accordingly which will ensure that the app works without any crashes.

Go to res -> xml -> settings_preference.xml. Change the package name on Line 27 to avoid crashes.

Note: Package name in the screenshots is renamed already (in Step 4).

Screenshots were borrowed from this StackOverflow Answer.

Tried and tested on Android Studio v3.3.2.

#Demo Credentials

  1. Username: mifos
  2. Password: password
Clone this wiki locally