Rename package name in android

元气小坏坏 提交于 2019-12-23 20:01:45

问题


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.


回答1:


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



回答2:


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:


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



来源:https://stackoverflow.com/questions/18842805/rename-package-name-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!