7

I am currently using Android Studio 1.4.1, the latest version. I would like to distribute my program among my friends, but it was a school final, so it's named FinalProject. I'd like to rename it, however whatever I try to do (even using answers from this site), I can't seem to do it.

I've tried right-clicking the root file on the bread crumbs, but it says "Can't rename root module." I don't really know what else I can do.

I've tried renaming the parts in the idea, build.gradle, and AndroidManifest.xml, but that didn't work. If I also rename it in the manifest, it breaks the entire manifest.

Wildfire Blake
  • 73
  • 1
  • 1
  • 3

1 Answers1

20

This always works for me, it will change the project's name, but be careful, it will not rename its internal packages.

  1. Close everything on your screen.
  2. Locate your project with your File explorer (Files, Finder, Windows Explorer or even the Terminal: $ cd your/path/to/file).
  3. Rename your project with the File explorer (make sure you do not get inside the project, just locate it).
  4. Open Android Studio.
  5. Import the renamed project.

After this, Android Studio will automatically build all the required files.

Evin1_
  • 12,292
  • 9
  • 45
  • 47
  • What would happen if the internal packages aren't renamed? I'm still new to this stuff, sorry. – Wildfire Blake Jan 28 '16 at 01:01
  • Don't worry it is all good. It will not really matter if you are not thinking on uploading your app to the play store, a package is only a (prefix) identifier for all the apps up there. – Evin1_ Jan 28 '16 at 01:03
  • On the other hand, if you are thinking on uploading it to the Play Store, then you should think about refactoring the code to change the package names too. Check this answer for more: http://stackoverflow.com/questions/16804093/android-studio-rename-package – Evin1_ Jan 28 '16 at 01:05
  • I don't plan on uploading it. I'm just sharing it with my friends. I'm not good enough to upload it. – Wildfire Blake Jan 28 '16 at 01:05
  • I tried to, but it didn't do it. And I'll try it out when I get home. – Wildfire Blake Jan 28 '16 at 01:15