For example currently I have package name like com.test.hello.company & I want to change it to com.test.company only. So How can I change & move the files in all these directories com.test.hello.company without any problem.
Asked
Active
Viewed 126 times
-2
-
2probably duplicate https://stackoverflow.com/a/29092698/2850044 – Vinay Jayaram Nov 26 '19 at 06:27
-
2Does this answer your question? [Rename package in Android Studio](https://stackoverflow.com/questions/16804093/rename-package-in-android-studio) – Jakir Hossain Nov 26 '19 at 06:31
-
try ctrl + shift + R – L2_Paver Nov 26 '19 at 06:57
1 Answers
0
- Right-click project package
- Select Refactor
- Click on Rename
- In the pop-up dialog, click on Rename Package instead of Rename Directory
- Enter the new name and hit Refactor
- Click Do Refactor in the bottom
- Allow a minute to let Android Studio update all changes

Sergey Glotov
- 20,200
- 11
- 84
- 98

MurugananthamS
- 2,395
- 4
- 20
- 49