There might be many situations when you want to change package name of the App in Android Studio. You might have download source code from internet and wants to rename the package name according to your App details. Here in this tutorial I am going to discuss step by step how to rename/change package name in Android Studio:
How To Change Package Name In Android Studio [Step By Step]
Step 1: First make sure you are viewing the project in Android view. For that follow the below image to change from project to Android view in Android Studio:
Step 2: Now click on setting gear icon and deselect Compact Empty Middle Package
Step 3: Now you will see each package folder is broken into parts
Step 4: Now right click on the first package folder, refactor and rename. Now a warning will be displayed but you go ahead and click Rename Package. After that enter your domain name for the package name.
Step 5: Now in the bottom of Android Studio it will display ‘Find Refactoring Preview’. Here click on ‘Do Refactor’
Step 6: Now it has change the package domain name of the App. Now go ahead, change the domain extension and App folder name according to your requirement:
Step 7: Now open build.gradle (Module: app) in Gradle Scripts. Here change the application id and click Sync Now. Finally it’s done and you have successfully changed the App package name in Android Studio:
Thanks, very well explained.
Go to Android Manifest -> Right click on each folder names or labels between dots -> Replace with new names ; Simple as that!
You forgot to mention that the app_name string needs to be changed.
WHat does that mean? How do I do that?
Go to the res folder, click values and open up your string, you will see your app name there
app_name is somethig of dev choice and got nothing do with package name itslef.
Thank you really helpfull
No match Client found for package name
open file gradle.properties, and find androidApplicationId, edit it like same new package
I don’t have any file called gradle.properties and the also the error no matching client found for package name
Thanks for sharing,great information.
master app development