Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I properly change my existing project name in Android Studio?

I tried to change my project name in Android Studio by the usual Refactor->Rename method, but since it did not really change it, it only made an add-on to the title OldName[NewName], I tried to just change the directory name itself. Since I will need that changed too. But then after I did that, I tried re-opening Android Studio and now it is freezing with the Waiting for ADB popup. Which I then have to use Activity Monitor to force quit Android Studio.

So, is there a proper way to change the name of your existing Android Studio project so that it really changes the name everywhere? Or are there a few steps to take to make sure it is changed everywhere? I also would then want my package renamed, since it took the name of my app name at creation. Thanks for your help.

like image 210
Azurespot Avatar asked Mar 13 '14 06:03

Azurespot


People also ask

How to change name of Android app in Android Studio?

Step 1: Click on the Setting Icon and Uncheck Compact Middle Packages Step 2: Click on your Project Name and Go to Refractor > Rename Step 5: Click on Do Refractor and then you will fill in finding that the project name is changed Doing this name of your app will be changed. Open app/src/main/AndroidManifest.xml and change the following line:

How to change package name in Android Studio?

How To Change Package Name In Android Studio [Step By Step] Step 1: First make sure you are viewing the project in Android view. Step 2: Now click on setting gear icon and deselect Compact Empty Middle Package Step 3: Now you will see each package folder is broken into parts Step 4: Now right click on the first package folder, refactor and rename.

How to change from project to Android view in Android Studio?

For that follow the below image to change from project to Android view in Android Studio: Step 2: Now click on setting gear icon and deselect Compact Empty Middle Package Step 3: Now you will see each package folder is broken into parts Step 4: Now right click on the first package folder, refactor and rename.

How do I change the name of my project?

1 Click on the Setting Icon and Uncheck Compact Middle Packages 2 Click on your Project Name and Go to Refractor > Rename 3 Click on Rename Packages 4 Change the package name and click on Refractor 5 Click on Do Refractor and then you will fill in finding that the project name is changed


3 Answers

In Android Studio you can change the name of the Android project in the file:

.idea/.name

location of file

Then File -> Invalidate caches/Restart

Upd:

Things have changed, so now just in the

settings.gradle

file change or create the line

rootProject.name = 'Your project name'
like image 164
Andrew Avatar answered Sep 30 '22 23:09

Andrew


The name of your application is not related to your Eclipse project name, open your res/values/strings.xml and modify app_name item to change your application name. You should change the name of your application from androidManifest.xml

android manifest

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >

strings.xml

<string name="app_name">newnameofapp</string>

By changing the package name also a method... try

Right click on the project -> Android Tools -> Rename Application package
like image 39
Jocheved Avatar answered Sep 30 '22 22:09

Jocheved


idea/.name 

Change the file content then restart android studio. Works for me.

like image 26
Khan Avatar answered Sep 30 '22 23:09

Khan