Rename package in Android Studio

后端 未结 30 1916
深忆病人
深忆病人 2020-11-21 05:21

How do you rename packages in the new IDE Android Studio, based on IntelliJ IDEA?

Is there an automatic refactoring included?

I want to make bulk refactorin

30条回答
  •  既然无缘
    2020-11-21 05:53

    Change the Package Name


    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.



    Right-Click > Refactor > Rename



    In the new window press Rename package



    Change name and press Refactor



    …and press Do Refactor at the bottom.



    Your package name usually is in format com.domain.appname, in this example we changed the appname part, but you can do the same steps for the domain too.

    Done! You changed your package name!

提交回复
热议问题