Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename a project in Android Studio [duplicate]

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.

like image 272
Wildfire Blake Avatar asked Jan 28 '16 00:01

Wildfire Blake


1 Answers

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.

like image 110
Evin1_ Avatar answered Sep 29 '22 12:09

Evin1_