Fully change package name including company domain

后端 未结 16 2507
礼貌的吻别
礼貌的吻别 2020-12-13 01:11

Let\'s suppose this is the package name: package com.company.name. How do I change company?

P.S. I saw how to change name but

16条回答
  •  孤街浪徒
    2020-12-13 02:11

    @Luch Filip's solution works well if you just want to rename the App package. In my case, I also want to rename the source package too, so as not to confuse things.

    Only 2 steps are needed:

    1. Click on your source folder e.g. com.company.example > Shift + F6 (Refactor->Rename...) > Rename Package > enter your desired name.

    2. Go to your AndroidManifest.xml, click on your package name > Shift + F6 (Refactor->Rename...) > enter same name as above.

    Step 1 will automatically rename your R.java folder, and you can build straight away.

提交回复
热议问题