Page 1 of 1

Android compiling?

Posted: Wed Aug 02, 2017 3:20 pm
by Pospos
every time i follow this tutorial:

Code: Select all

Firstly clone the android LÖVE project:

 git clone https://bitbucket.org/MartinFelis/love-android-sdl2

Then, download the Android SDK and NDK (currently only compatible with ndk 14b or less). And put a file called local.properties in the root path of project with the content (replacing ... by the local corresponding) :

ndk.dir=... 
sdk.dir=...

Put the game (game.love) in the directory (project)/app/src/main/assets (if this directory don't exist create it).

And finally to generate the apk, do:

./gradlew build

To Linux/macOS systems can be necessary run before: chmod +x gradlew

The apk will be in (project)/app/build/outputs/apk/
i get this error :

Code: Select all

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
please, i follow evertything step by step that's exactly what i did.

Re: Android compiling?

Posted: Thu Aug 03, 2017 1:55 pm
by Wilma456

Re: Android compiling?

Posted: Mon Aug 14, 2017 1:40 am
by kicknbritt
That tool was literally a godsend for me when I found it.

Re: Android compiling?

Posted: Thu Aug 17, 2017 12:32 pm
by BörnedByLOVE
Wilma456, thank you for pointing that out! Great tool! I started compiling game.apk's right away.

One minor issue: The resulting apk's are named "Game " plus a 10digit number. Very clumsy.
So I tried to rename the apk. But I found no easy way to fix this. (No way editing the .bat or .sh script)

Was anyone more successful?

Or is there an external tool for renaming apk's?


(This might not the appropriate place to ask, huh? Links to better places are welcome, too.) ;)