Page 1 of 1

Building a release signed APK from the .love

Posted: Tue Feb 23, 2016 5:18 pm
by DavidOliveiraSilva
Hello!
I am very newbie to this forum (and very newbie to forums in general), but I search for a solution to my problem on this forum (also on all the web) and I posted my problem on "Questions that don't deserve their own thread" thread. I couldn't find anything :death: ...
this wonderful wiki shows how to create a debug APK by entering the command "ant debug", but you can use the command "ant release" and you will get the release-unsigned.apk file.
Both debug and release-unsigned work really fine on android. I tested my silly game on android using both modes. But when I tried to submit my app to play store, they said that my app needs to be signed. fine. it was needed to create some keys to sign my app. I did everything correctly, then I used the "ant release" command and i got this Build Failed on the signing part...
I wanna know what can I do..
sorry for my imperfect english and thank you

Re: Building a release signed APK from the .love

Posted: Wed May 31, 2017 2:39 am
by uederson
Hi, friend!
I don't know if you got the answer to this on someplace else, but here is how I did it (after a lot of google searches) :awesome: :

1.Use "ant release" to build the apk;
2.Using the cmd, go to the bin folder where is the apk;

3.Use the command below to create a keystore:
keytool -genkey -v -keystore your_keystore_name.keystore -alias your_alias_name -keyalg RSA -keysize 2048 -validity 10000

4.Use the command below to sign the apk using the created keystore:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore your_keystore_name.keystore your_app.apk your_alias_name

5.Go to "sdk/tools" with the cmd and use the command below:
zipalign -f -v 4 "path_to_your_unaligned_apk" "path_to_the_aligned_apk"

PS: you need to check if there is a "zipalign.exe" file inside the "tools" folder. I have two Android sdks on my computer, but only one of them has this .exe file inside the "tools" folder.

I don't know if this is the best way to do it, but it worked for me!

Cheers!

Re: Building a release signed APK from the .love

Posted: Wed May 31, 2017 12:08 pm
by TheHistoricApple
your_keystore_name
your_alias_name
how do i get a keystore

Re: Building a release signed APK from the .love

Posted: Wed May 31, 2017 1:06 pm
by TheHistoricApple
i figured out how to sign it i think now im stuck at the
5.Go to "sdk/tools" with the cmd and use the command below:
zipalign -f -v 4 "path_to_your_unaligned_apk" "path_to_the_aligned_apk"
part, i only have one apk i got from ant release?

Re: Building a release signed APK from the .love

Posted: Tue Jun 23, 2020 6:48 am
by jadius93
Hi both,

how do you do the first step
"1.Use "ant release" to build the apk;"

replacing the ant debug by ant release in my make-apk.bat gives me an error..

I've been struggling for a while with this..

Thanks for the help!

Re: Building a release signed APK from the .love

Posted: Tue Jun 23, 2020 7:26 am
by jadius93
jadius93 wrote: Tue Jun 23, 2020 6:48 am Hi both,

how do you do the first step
"1.Use "ant release" to build the apk;"

replacing the ant debug by ant release in my make-apk.bat gives me an error..

I've been struggling for a while with this..

Thanks for the help!
Solved - actually ant release solves it, the created .apk file was not copied to the root folder since its name changes from xx-debug.apk to xx-release.apk