Package Name

To rename package name in Android studio open your project in Android mode first as shown in the below image.

Now click on the setting gear icon and deselect Compact Middle Packages.

Now the packages folder is broken into parts as shown in the below image.

Now right-click on the first package name (com) and Refactor > Rename. A warning message will be displayed but go ahead and click on the Rename current button.

Rename the directory name as your requirement and click on the Refactor button.

Note: Go to Build > Rebuild Project to display the updated name.

Now you can see your directory name changes from com -> gfg as shown in the below image.

Do the same for the domain extension and App folder name according to your requirement.

Now you can see the package name has been changed.

Now go to the build.gradle (Module: app) in Gradle Scripts. Here change the applicationId and namespace value then click on Sync Now. And you are successfully renamed your package name.


© 2025 OnebyteSolution™. All Rights Reserved. Built with ❤️