问题
I want to change my apk name in the project workspace. How to do it by editing the AndroidManifest.xml file?
回答1:
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.
回答2:
android update project --name your_desired_name --path .
This changes the ANT project name in build.xml.
回答3:
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.
回答4:
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
回答5:
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.
回答6:
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.
回答7:
Right click on your project->Go to refactor->select rename & give name of the file. It will rename apk file.
回答8:
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")
}
}
回答9:
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
回答10:
In the manifest file,
android:label="@string/app_name"
changing this appname in string xml worked for me.
回答11:
Explore your project
rec > values > String.xml
Change it which you want
<string name="app_name">Your App Name</string>
回答12:
Change the name of your application to the root steps:
click on your application root.
click f2 button.
and change the name which you want of ur apk
来源:https://stackoverflow.com/questions/6777813/how-to-change-apk-name-by-editing-manifest-file