Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When building android project with ant debug command, my apk has the word debug attached to the name. How i change it?

I use "ant debug" to build my project. After building with this command, my apk name is sample-debug.apk (My project name is sample). I want it to be sample.apk after building it. How can i do this by modifying the build.xml.

please do not suggest me to rename the apk after it is built.

like image 835
BlackberryChennai Avatar asked Jan 18 '23 03:01

BlackberryChennai


1 Answers

There's no technical reason to change the name, but if you want to you can over-ride the underlying ant task that sets the debug parameters. Currently it looks like this:

<target name="-set-debug-files" depends="-set-mode-check">
    <property name="out.packaged.file" location="${out.absolute.dir}/${ant.project.name}-debug-unaligned.apk" />
    <property name="out.final.file" location="${out.absolute.dir}/${ant.project.name}-debug.apk" />
    <property name="build.is.mode.set" value="true" />
</target>

You can paste that into your local build.xml above the import statement and change the values to whatever suits you.

I hope that helps.

like image 143
Phillip Fitzsimmons Avatar answered Jan 20 '23 16:01

Phillip Fitzsimmons