Change the Project Name
1)go to your project folder, rename it…
2)Delete the .idea folder and .iml file.
3)Open the settings.gradle file with a text editor, like VSCode, and change the rootProject.name to your new project name.
4)Just open your project with the Android Studio and Gradle will sync again.
Close Android Studio
Change project root directory name
Open Android Studio
Open the project (not from local history but by browsing to it)
Clean project
If your settings.gradle contains the below line, either delete it or update it to the new name. rootProject.name = 'Your old project name'- A new *.iml file will then be created, the old one(s) can safely be deleted.
- Change app_name in strings.xml (if exists), otherwise it will build the APK with the old name.
Change the App Name
Usually, when you change the project name, you wanna change the name of your app too.
Go to the res folder > values > strings.xml and change the app_name to your new name.
Change the Package Name1)To rename your package name, all you have to do is go to your AndroidManifest.xml file,
put your mouse cursor in front of the part of the package name you want to change.
2)Right-Click > Refactor > Rename
In the new window press Rename package
Change name and press Refactor
…and press Do Refactor at the bottom. |