How to rename package name in Android Studio

preview_player
Показать описание
This short tutorial will show you how to change the package name in Android Studio.

Here are the steps you need to follow:
1) Make sure you have Android selected in the project Explorer.
2) Click in the 'Gear' icon and highlight/untick the 'compact empty middle packages'.
3) Right click on the top level domain name under the Java folder. Click on refactor, then click on rename.
4) If you have multiple directories android studio might ask you to rename all directories. If so, select 'rename current'.
5) In the pop up menu titled 'Rename', put in your top level domain name (org, com, net...) and click refactor.
6) Do the same thing for the domain name and the app name.
8) Near applicationId, rename the package name with the same package if you used for the folders.

The package name should be in this format: com.DomanName.AppName

Рекомендации по теме
Комментарии
Автор

there is no such rename option showing for me in refactor section, any help please? on refactor it only shows me:
modularize
remove unused resources
migrate to appcompat
miagrate to androidx

alxalx
Автор

Sir
I am trying to change phone pe app package name but the refractor rename option is not highlighted
Plz help

madmangaming
Автор

Thank you sir it''s work for my project....Smile....

hemrajkumawat
Автор

can u change the name of uc browser android app.if i change its name than i install i got error the browser is unofficial in popup notification....

privatenumber