Building LÖVE for Android - Windows
This is a guide for Microsoft Windows based on the Arch Linux guide
Install Java SDK
JDK for short is needed for the Android SDK, you can find it here (select the one without NetBeans since it's not needed).
In the following page Accept the License Agreement and download the right file for your system (x86 or x86_64)
Then just install the Java SDK normally
Go to the "Current Release of Ant" and select the zip file.
Once downloaded unzip it in a known directory. e.g:
Installing the Android SDK
Download the Android SDK.
WARNING: The Download button on the right is for preconfigured install. Instead go to "Get just the command line tools" and get the installer.
Next install the SDK on your computer
Once you have installed the Android SDK execute it, deselect all, and install the following packages:
- Android SDK Platform-tools
- Android SDK Build-Tools Rev 19.1
- Android 4.4.2 (API 19)
- SDK Platform
- ARM EABI v7a System Image
- Google APIs
- Sources for Android SDK
- Android Support Repository
- Google USB driver
Select the "Accept License" radial, and click Install.
Download the Android NDK zip file, you can unzip it wherever you want. e.g:
love-android-sdl2 repo. For this task you can use a Git tool or just download it from the Downloads section in a zip file
git clone https://bitbucket.org/MartinFelis/love-android-sdl2.git
Once in the download page go to the Tags section and there download the lastest version (.zip files are prefered)
You can place the repository wherever you want. e.g
Set up environment vars
To set up environment variables press
Pause or go to
My Computer right click
In the left sidebar select
Advanced and at the bottom of the prompted window it should say
Environment Variables, Select that option.
In the System variables area, click the
New button at the bottom and fill the fields with the following:
Name: ANT_HOME Value: C:\ant (or whatever directory you used for ant)
Do that again but this time insert this:
Name: JAVA_HOME Value: C:\Program Files\Java\jdk1.7.0_51 (or the Java SDK directory)
That one was for the Java SDK, now do it for the Android SDK:
Name: ANDROID_SDK Value: C:\Users\USERNAME\AppData\Local\Android\android-sdk (or your Android-SDK path)
Again, this is the same as the last one, just changes the name:
Name: ANDROID_HOME Value: C:\Users\USERNAME\AppData\Local\Android\android-sdk (or your Android-SDK path)
This time is the Android NDK:
Name: ANDROID_NDK Value: C:\Users\USERNAME\bin\android-ndk-r9c (The path to the Android NDK)
The last one is for the SWT tools:
Name: ANDROID_SWT Value: %ANDROID_SDK%\tools\lib\x86 (Replace Android SDK for your Android SDK directory and use x86_64 in 64bits systems instead of x86)
Now look for a variable in the second list named
Edit and ADD the following
ndk-build on the
Optionally you can supply the
--jobs flag if you have multiple cores. Suggested usage is
n+1 cores, where
n is the number of cores your machine has. This is what one might use for an 8 core machine;
ndk-build --jobs 9
To run this command you can open a command prompt in the folder (
Right Click and
Open command prompt).
Or you can create a text file with the extension
.bat and inside of it write the command
At this point, you would do all the specific changes that relate to your game. See the Game Packaging section for information on how to do that.
Use Apache Ant to deploy:
To use this command you can do the same that you did with "ndk-build",
Right Click or create a text file with the
.bat extension and the command inside of it