Rename package name in android

2019-07-04 09:24发布

I want to rename package name in my project. I have 9 packages so far and when I have change package name ,the changes are done in java and xml file.

But in Manifest.xml file, the activity definition section , package activity doesn't change after rename package.

Please help me.

3条回答
三岁会撩人
2楼-- · 2019-07-04 09:45

First change the package name in the manifest file
Re-factor > Rename the name of the package in src folder and put a tick for rename subpackages, thats it.

查看更多
3楼-- · 2019-07-04 09:48

Could you use Search and replace?

In Eclipse:

Open the AndroidManifest.xml

Edit-->Find/Replace

Find: old.app.name
Replace With: new.app.name

Click OK.

Just check everything is OK before you save the file.

/Steffen

查看更多
手持菜刀,她持情操
4楼-- · 2019-07-04 09:55

There is an option for this in Android Tools, here are the steps for doing this

  1. Right Click on the project
  2. Click on Android Tools
  3. Click on Rename Application Project
  4. Enter the new package name
查看更多
登录 后发表回答