Rename package in Android Studio

后端 未结 30 1922
深忆病人
深忆病人 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:54

    Changing the application ID (which is now independent of the package name) can be done very easily in one step. You don't have to touch AndroidManifest. Instead do the following:

    1. right click on the root folder of your project.
    2. Click "Open Module Setting".
    3. Go to the Flavours tab.
    4. Change the applicationID to whatever package name you want. Press OK.

    Note this will not change the package name. The decoupling of Package Name and Application ID is explained here: http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename

提交回复
热议问题