Building LÖVE for Android - Android Studio
This guide will show you how to build LÖVE for Android using Android Studio. Android Studio is supported on Windows, Mac, and Linux.
JDK, or Java SDK, is needed for Android Studio.
Windows or Mac
You can download Java SE Development Kit 8 from the official site here. Just install it like you would any other program.
You can download OpenJDK 8 from your distribution's package manager.
sudo apt install openjdk-8-jdk
sudo pacman -S jdk8-openjdk
Install and Configure Android Studio
If you haven't already, install Android Studio from here.
Open up the SDK Manager (under configure) and check (if not already checked) the following:
Under SDK Platforms:
- Android 7.1.1 (Nougat) [API 25]
Under SDK Tools:
- Android SDK Platform-Tools
- Android SDK Tools
- Support Repository -> Android Support Repository
If you're building for LÖVE 0.10.2, use NDK 14b.
Go ahead and apply, and it will take some time to download these packages.
If you haven't downloaded love-android-sdl2, do it now. Either you can download the repository as a .zip file from here and extract it, or use git to clone this project.
Next, import the project using the "Import Project (Gradle, Eclipse, ADT, etc.)" from the "Welcome to Android Studio" window.
If you get a sync error saying "Could not find com.android.tools.build:gradle:3.0.1.", go ahead and add the Google Maven Repository and re-sync the project.
Game Packaging and Building
Package the game using according to Game Packaging.
Instead of deploying with Ant, just build the project under
Build -> Make Project.
The output apk will be