22

I want to change my apk name in the project workspace. How to do it by editing the AndroidManifest.xml file?

indira
  • 6,113
  • 16
  • 58
  • 78
  • 1
    It does not seem to be possible according to this post http://stackoverflow.com/questions/3482086/android-how-to-set-the-name-of-the-compiled-apk – sealz Jul 21 '11 at 14:39
  • possible duplicate of [How to change an Android app's name?](http://stackoverflow.com/questions/5443304/how-to-change-an-android-apps-name) – Richard Le Mesurier May 28 '14 at 08:23

12 Answers12

36

In manifest file, you can change the application label only. If you want to change the apk file name, you should change your project name. To do this, you just right click on your project in Navigator windows, choose Refactor>Rename and type a new name for it.

Munim Dibosh
  • 2,201
  • 1
  • 16
  • 27
Nguyen Minh Binh
  • 21,451
  • 30
  • 108
  • 156
  • In Android Studio, renaming by clicking on the Project (under the `java` folder), will not rename the package name for `uses-permission` or `category` tags in the AndroidManifest.xml. You will need to rename these manually for your app to continue to work properly. – Adam Link Apr 16 '15 at 23:33
  • 1
    In your build.gradle, it will also not rename your `applicationId` to the new apk name. – Adam Link Apr 16 '15 at 23:46
13
android update project --name your_desired_name --path .

This changes the ANT project name in build.xml.

j0k
  • 21,914
  • 28
  • 75
  • 84
1

go to manifest.xml where you can change the name of android:label to change the name of app example: if the app name is hello world! and you want to change to thug life then change android:label="hello world!" to android:label = "thug life" its as simple as i said

1

In Eclipse ( Either Windows or Linux) , right click the root of the project folder and rename the project. The apk will take the new name.

diptia
  • 1,867
  • 20
  • 20
0

In the manifest file,

android:label="@string/app_name"

changing this appname in string xml worked for me.

JK_S
  • 125
  • 1
  • 5
  • 2
    This will change the name that is shown once your app is installed;beneath the app icon.Please don't misguide if you don't understand what the question really is.But I have voted it up just to inspire to learn more.Best of luck. – Munim Dibosh Jan 18 '13 at 09:45
0

Right click on your project->Go to refactor->select rename & give name of the file. It will rename apk file.

VJVJ
  • 415
  • 2
  • 17
0
  1. Explore your project

  2. rec > values > String.xml

  3. Change it which you want <string name="app_name">Your App Name</string>

mech
  • 2,368
  • 5
  • 26
  • 34
0

Now you can try it changing the Gradle file :

   android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"
    defaultConfig {
        applicationId "com.company.app"
        minSdkVersion 13
        targetSdkVersion 21
        versionCode 14   
        versionName '1.4.8' 
        setProperty("archivesBaseName", "MyAppName-$versionName")
    }
}
Jéwôm'
  • 3,202
  • 3
  • 28
  • 62
0

from the manifest.xml you can change application lebel only. you cant change apk name from there.

By default, Android Studio generates APK name like app-debug.apk or app-release.apk. But, i want to generate my own APK name. You can change it with your whatever name you desire with small changes in build.gradle file. Then Android Studio will generate signed APK for you.

This is the simple one that works for me using Android Studio 3.

Edit module(app) build.gradle, and add below:

android.applicationVariants.all { variant ->
    variant.outputs.all {
        def appName = "YourAPKName"
        outputFileName = appName+"-${variant.versionName}.apk"
    }
}

This code will generate file with name: YourAPKName-1.0.apk

TanvirChowdhury
  • 1,851
  • 13
  • 21
0

I think its possible to change the generated apk file name from Android Manifest xml. Change the application's root package name in Android manifest.xml ... need to tweek the code a bit and now the generated apk would have different name.

success_anil
  • 3,554
  • 3
  • 24
  • 31
0

In Eclipse on Windows you can do it by right-clicking on the root of the application in Package Explorer, pick Android Tools, then Rename Application Package.

CSX321
  • 309
  • 1
  • 2
  • This just renames your base package name, not the output filename of the apk file. – donturner Jan 13 '12 at 16:31
  • True, but it wasn't really clear from the discussion which the OP was trying to accomplish. – CSX321 Jan 17 '12 at 17:57
  • @donturner So you vote it down, because in your opinion it was "pretty clear"? I've re-read it all several times, and I still don't think it's that clear. It's not uncommon for "apk" and "package" to be used interchangeably, and other answers were talking about changing the package name and the apk name. Since the OP never returned, I guess we'll never know. You could have simply commented. You could have edited my answer to add your opinion. Instead you vote it down and take away some of my (few) reputation points. Nice friendly place here. Makes me not want to try and answer anything else. – CSX321 Jan 31 '12 at 00:12
  • 1
    Upvoting/downvoting is the very essence of what SO is about. Don't take it personally. Your answer was unhelpful to me because 1) it didn't solve my problem and 2) was a waste of time because Rename Application Package is a one-way refactor operation in Eclipse and cannot be undone without manually going through all code which was affected by the refactor. – donturner Jan 31 '12 at 13:57
-5

Change the name of your application to the root steps:

  1. click on your application root.

  2. click f2 button.

  3. and change the name which you want of ur apk

duggu
  • 35,841
  • 11
  • 112
  • 110
  • I think you should add a bit more detail here, so that the answer is readable to those who are new to Android programming. – Totoro Jun 20 '13 at 05:00