Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: How to set the name of the compiled APK?

Tags:

android

This question seems embarassingly simple, yet it vexes me still. I am using the standard ADT and Eclipse Android environment to build my Android app. The apk is named after the project name in Eclipse, but I want to name the apk something different...How can I customize the name of the apk artifact that is produced when the project builds?

like image 675
JohnRock Avatar asked Aug 14 '10 05:08

JohnRock


People also ask

Can we change package name of APK?

I would recommend unpacking the apk with apktool, and then edit the apktool. yml, setting renameManifestPackage to the new package name. Then when you rebuild the apk with apktool, it should use aapt's --rename-manifest-package functionality to change the package name.

Can I rename app debug APK?

If anyone is looking to change apk name outside the Android studio(just to send this file to someone else, as in my case), just right click the app name and change it to whatever you want. Save this answer.


2 Answers

android update project --name your_desired_name --path .

ant debug

like image 179
Vadym Radionov Avatar answered Sep 21 '22 08:09

Vadym Radionov


You can also just edit the build.xml as following:

<project name="YourNewProjectNameHere" ...

if you are building with "ant" on the command line. Otherwise, Eclipse will always use your official ProjectName when create an apk. However, you can override that by right-clicking on project, and selecting Android Tools->Export Signed Application Package; which will then allow you to specify your own name for the package.

like image 40
Aki Avatar answered Sep 23 '22 08:09

Aki