3

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.

Maxim Shoustin
  • 77,483
  • 27
  • 203
  • 225
dips
  • 41
  • 1
  • 3
  • AFAIK you will have to manually change it in manifest file as there is no other option, if there is one i am also waiting for the same. – Shrikant Sep 17 '13 at 06:43
  • but in my manifest file,there are 20 activity.so how can you possible manually change all file package name? – dips Sep 17 '13 at 06:45

3 Answers3

3

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
Maxim Shoustin
  • 77,483
  • 27
  • 203
  • 225
Ashok
  • 1,251
  • 11
  • 19
  • but in this way,android manifest file not be changed.please give me other solution. – dips Sep 17 '13 at 06:42
  • Have you checked the checkbox "update fully qualified names in non-java text files" while renaming the package? – Ashok Sep 17 '13 at 06:46
  • yes. i already tried it. manifest file package name change but declared activity packagename not change. – dips Sep 17 '13 at 06:48
1

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.

laalto
  • 150,114
  • 66
  • 286
  • 303
Nikhil Virupakshi
  • 482
  • 2
  • 13
  • 26
-2

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