android – How to change apk name by editing manifest file?-ThrowExceptions

Exception or error:

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

How to solve:

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.

###

android update project --name your_desired_name --path .

This changes the ANT project name in build.xml.

###

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.

###

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

###

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.

###

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.

###

In the manifest file,

android:label=”@string/app_name”

changing this appname in string xml worked for me.

###

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

###

  1. Explore your project

  2. rec > values > String.xml

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

###

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")
    }
}

###

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

###

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

Leave a Reply

Your email address will not be published. Required fields are marked *