Featured

What is AdvanceTech ?

Little steps to bring simplicity in learning technology.

For some viewers below image for The Sun set and for some viewers The Sun rises , For me this is Rise of hope ! With this attitude I would like to share my knowledge and experience in this site. This is my first time to write any blog  😉 .

I would like to thanks my wife to encourage me to write blogs .

post

Refactor Package name in Android studio

For Example, if you want to change package from com.example.test.myapplication to com.example.animation.myapplication  .

Do below steps:

  1. Select below option from project pane.

    Capture1
    fig 1
  2. Toggle Compact Empty Middle Packages/ Hide Empty Middle Packages as below
Untitled1
fig 2

3. When Toggle compact package name to Hide Empty packages package name will broken up in individual name like below.

Capture2
fig 3

4. Now Click on individual directories and select Refactor using right click on directory name which you want to change or use Shift + F6 then select rename package.

Capture3
Fig 4

5. Now Rename your package

Capture4
fig 5

6. Select Refactor and do refactor from Find refactoring Preview  in bottom of Android studio.

Capture5

Now your package will rename in all places no need to worry!

Thanks !!

Advertisements