1

I know there are questions and answers about this on StackOverflow but none of them tell about the complete rename prosses.

I want to rename every part of the application includes Module name, Package name, App name, and other parts that I don't know because I am a beginner.

Are there more parts after Module name, Package name, and App name to rename...?

I successfully renamed Package and App name but failed with Module name.

  • A brutal approach would be to pipe all files thru a search and replace and make the same search and replace on the filenames. Brute force but would probably work. – Simson Oct 08 '19 at 04:04

3 Answers3

1

step 1.

Go to the manifest file change package name 

step 2.

Go to the Build.gradle(Module:app) -> chnage applicationId and sync project

step 3.

Refactor folder's name as per package name 

hope it will helps :D

Aamil Silawat
  • 7,735
  • 3
  • 19
  • 37
0

To change package name correctly follow this answer -

Rename package in Android Studio

and to rename Application name update "app_name" in string.xml file in resources -

 <string name="app_name">
   New Name
</string>
Naresh NK
  • 1,036
  • 1
  • 9
  • 16
0

Even though you have refactored your package name you have to change the package name manually in your app level build.gradle file.

defaultConfig {
    applicationId "com.app.package" // change according to your new package name
}
jbmcle
  • 771
  • 3
  • 12
  • I have no problem with the Package name, I did it but there are lots of code still contains the older name of application even tho I changed the Package name and App name. I actually want to know what other parts I need to rename after Module, Package and App name...? –  Oct 08 '19 at 05:47
  • I assume that you have used the refactor and renamed option rather than just the rename package name option, with the refactor option the IDE will take care of every class and renamed all of the imports. – jbmcle Oct 08 '19 at 06:18
  • I hope your project is on a version control system. What I would do is revert it and then refactor the package name. Changing the app name is easy, changing a package name requires more effort. – jbmcle Oct 08 '19 at 06:20
  • Thanks, Is there anything else that can be renamed apart from Module name, App name, and Package name while renaming an app...? –  Oct 08 '19 at 09:43
  • Usually, when you change your app's name you're most likely to change the package name. When you use the refactor option the IDE will take care of everything else except renaming the `applicationId` in app-level build.gradle file. If this solved your problem please consider accepting it as an answer. – jbmcle Oct 08 '19 at 12:46