0

my application package name like this :

com 
  example 
      developer 
           myproject 

and I want to change it like this :

com 
  fyk
    myproject

how can I do this ? Any advice or tutorial please ?

Abhinav Gupta
  • 2,225
  • 1
  • 14
  • 30
podgradle
  • 336
  • 1
  • 10
  • 17
  • 2
    Possible duplicate of [Android Studio Rename Package](https://stackoverflow.com/questions/16804093/android-studio-rename-package) – Xenolion Mar 06 '18 at 09:22
  • Here is Answer : https://stackoverflow.com/a/29092698/8448886 – Abhishek kumar Mar 06 '18 at 09:23
  • Go to Manifest, Select the Packge name seperated by dots(.) , right click refactor enter a new name and continue. As simple As this. Or in Gradle you can give any name you want to package, irrespective of Package created in Project folders – Akshay Mar 06 '18 at 09:32

4 Answers4

0

Rename example to fyk. Then shift all the java files of my project to fyk. Delete My Project Now rename the developer to My Project

0

Right click on the package and use rename option from refactor option. It will refactor all other class in that package automatically.

0

I'm not sure about Android Studio, but if you use Eclipse, it can be done quite simply:

  1. Select the package you want to change

  2. Press F2

  3. Enter the new package name

Or create a new package and copy the files from the old one to the new one

congard
  • 945
  • 2
  • 10
  • 28
0

In Android studio top of project structure small gear icon(options menu) available click it and uncheck compact empty middle packages now your project package folder structure will be broken up. now you can rename it easily

Manivash
  • 48
  • 6