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?
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.
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.
android update project --name your_desired_name --path .
ant debug
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With