How to change package name in Android Studio ?

3 minutes read

Every Android app has a unique application ID that looks like a Java package name, such as com.example.myapp and your app url of playstore also includes your package name.

Step by step

Follow the below steps

  • In the Project pane, click on the little gear icon.Uncheck/Deselect the Compact Empty Middle Packages option.

  • Your package directory will now be broken up in individual directories.

  • Individually select each directory you want to rename, and: Right-click itSelect RefactorClick on RenameIn the Pop-up dialog.

  • Click on Rename Package instead of Rename Directory Enter the new name and hit RefactorAllow a minute to let Android Studio update all changes.

  • Now open your build.gradle (Usually 'app' or 'mobile'). Update the applicationId to your Package Name and Sync Gradle, if it hasn't already been updated automatically.

Was this article helpful?