Building a release signed APK from the .love

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
DavidOliveiraSilva
Prole
Posts: 19
Joined: Fri May 29, 2015 10:19 pm
Location: Quixadá, Brazil
Contact:

Building a release signed APK from the .love

Post 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
uederson
Prole
Posts: 30
Joined: Mon May 23, 2016 7:59 pm
Location: Brazil
Contact:

Re: Building a release signed APK from the .love

Post 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!
TheHistoricApple
Prole
Posts: 26
Joined: Sun Jan 15, 2017 6:46 am

Re: Building a release signed APK from the .love

Post by TheHistoricApple »

your_keystore_name
your_alias_name
how do i get a keystore
TheHistoricApple
Prole
Posts: 26
Joined: Sun Jan 15, 2017 6:46 am

Re: Building a release signed APK from the .love

Post 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?
jadius93
Prole
Posts: 3
Joined: Mon May 11, 2020 2:46 pm

Re: Building a release signed APK from the .love

Post 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!
jadius93
Prole
Posts: 3
Joined: Mon May 11, 2020 2:46 pm

Re: Building a release signed APK from the .love

Post 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
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest