Skip to main content

1 - Change Package Name

In this section, we will see how to change the package name.

You can also follow along with this video.

Open Project#

Extract the files in the to a new folder. and open this folder in the android studio. After the Project is fully loaded in the android studio, in the Project panel, change the dropdown option to Project.

Open Project and Select Project

Change Project View Settings#

Click the setting icon in the Project panel and make sure these options are not checked.

  • Flatten Packages
  • Compact Middle Packages

Project View Settings

Change Package Name#

Navigate to app/src/main/java/com/wpinandroid/ folder in the Project panel.

Navigate to Folder

Right-click on the folder wpinandroid and select Refactor->Rename.

Navigate to Folder

A dialog will open and enter a new name on the dialog and click refactor button.

Navigate to Folder

Update Package Name In build.gradle#

Navigate to app/build.grale and open build.gradle.

Find this

applicationId: 'com.wpinandroid'

Replace com.wpinandroid with your app package id

applicationId: 'com.myappid'

then click Sync Now to let the Project will sync.


Update Package Name In shortcuts.xml#

Navigate to app/src/main/res/xml/shortcuts.xml and open shortcuts.xml. Press Ctrl + R to find and replace. Then enter wpinandroid in find and myappid in replace and click replace all.