Android compiling?

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
Pospos
Citizen
Posts: 73
Joined: Sun Jun 18, 2017 11:10 am
Location: Agadir

Android compiling?

Post 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.
User avatar
Wilma456
Prole
Posts: 12
Joined: Mon Jul 03, 2017 2:27 pm
Location: Germany

Re: Android compiling?

Post by Wilma456 »

User avatar
kicknbritt
Citizen
Posts: 96
Joined: Sat May 30, 2015 2:15 am
Location: Chicago, IL/Anchorage,AK

Re: Android compiling?

Post by kicknbritt »

That tool was literally a godsend for me when I found it.
"I AM THE ARBITER!!!" *Pulls out Energy sword and kills everything*
BörnedByLOVE
Prole
Posts: 9
Joined: Wed Aug 16, 2017 9:56 pm

Re: Android compiling?

Post 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.) ;)
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests