Change Package Name
Last updated
Last updated
All Android apps have a package name. The package name uniquely identifies the app on the device; it is also unique in the Google Play store.
In MasterStudy App there is a specific package name that is used: com.example.masterstudy_app. You should change it to your own package name, for example, com.mycompany.name where the Mycomapny will be the name of your brand.
To change the package name you need to follow some steps.
In your Project panel, click on the little gear icon.
Uncheck the option Compact Empty Middle Packages
Your package directory will be broken into individual directories
Individually select the directory you want to rename, and follow these steps:
Right-click it >> Select Refactor >> Click on Rename
Enter the new name and hit Refactor
Click Do Refactor in the bottom and wait a minute to let Android Studio update all changes.
Note: When renaming com in Android Studio, it might give a warning. In such case, select Rename All.
Edit build.gradle (Module: app) file in the Gradle Scripts
Find the 50th line and change “com.stylemixthemes.masterstudyapp” to your package name.
After that click on Sync Now to synchronize Gradle.
Then go to App > Manifests and edit the file AndroidManifest.xml if it wasn't changed automatically.
From the Android Studio menu open Build and click on the Clean Project. Wait until Android Studio finishes the process.
After that, in the same menu find and launch Rebuild Project.
This is the final step in changing the package name.