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.
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.
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