Help Building Android APK

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
drikdrok
Prole
Posts: 36
Joined: Sun Mar 15, 2015 9:53 am
Contact:

Help Building Android APK

Post by drikdrok »

Hi!
I have a game that I want to release on the Play Store. But I'm having multiple problems.

The guide here: https://bitbucket.org/MartinFelis/love- ... _-_Windows
Seems to be quite outdated, and I would really appreciate if someone could give some more details, and answer the problems I have below:

First off, the Android SDK. Downloading "just get the command line tools" gives this error
error.png2.png.png
error.png2.png.png (182.48 KiB) Viewed 4635 times
Fair enough, problem is the sdkmanager.bat closes on startup. I can only assume it's an error aswell. So I just went ahead and got Android Studio.

My Second problem is with cloning the repo. I get this error:
error.png
error.png (12.95 KiB) Viewed 4635 times
This is no big deal tho, I can just download the zip.

Third problem: Setting up environment variables. This is a direct consequence of problem 1.

The vars ANDROID_HOME, ANDROID_SDK, and ANDROID-SWT should be linking to the sdk... But I can't install the SDK. I don't know how to set it up for Android Studio.

Fourth Problem Running the NDK

How do I do this? Doubleclicking the ndk-build.cmd just closes instantly. Trying to drag it over the love-android-sdl2, kinda like how you run games, doesn't work either. Below, it says to shift-rightclick, but this doesn't do anything either.

I'm completely lost. A more comprehensive guide would be a life-saver. :awesome:
User avatar
Marty
Citizen
Posts: 89
Joined: Mon Dec 04, 2017 1:47 am
Location: Germany

Re: Help Building Android APK

Post by Marty »

Start Android Studio and go to your settings, there is SDK manager that allows you to download everything you need. Download the SDK files. For the NDK you need CMake and LLDB, too. Check those with the NDK in the Tools section of the SDK manager (there are more tabs).

Android Studio will run the NDK for you. You should be able to build the project with Gradle, automatically. I'm stuck on a runtime error, too, but this is how I could compile it, successfully.
Visual Studio Code TemplateRichLÖVE Mobile (AdMob+UnityAds+PlayGamesServices+GameCenter)Add me on Discord

───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
───█▒▒░░░░░░░░░▒▒█───
────█░░░░░░░░░█────
▄▄──█░░░▀█▀░░░█──▄▄
█░░█▀▄░░░░░░░▄▀█░░█
User avatar
drikdrok
Prole
Posts: 36
Joined: Sun Mar 15, 2015 9:53 am
Contact:

Re: Help Building Android APK

Post by drikdrok »

modiX wrote: Mon Dec 11, 2017 11:29 am Start Android Studio and go to your settings, there is SDK manager that allows you to download everything you need. Download the SDK files. For the NDK you need CMake and LLDB, too. Check those with the NDK in the Tools section of the SDK manager (there are more tabs).

Android Studio will run the NDK for you. You should be able to build the project with Gradle, automatically. I'm stuck on a runtime error, too, but this is how I could compile it, successfully.
Thanks a lot! :awesome:
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Help Building Android APK

Post by yetneverdone »

Hey. I feel you. That guide is outdated so I've made a new one. Please check
https://bitbucket.org/brbl/love2d-admob ... nstruction
User avatar
drikdrok
Prole
Posts: 36
Joined: Sun Mar 15, 2015 9:53 am
Contact:

Re: Help Building Android APK

Post by drikdrok »

yetneverdone wrote: Tue Dec 19, 2017 12:14 am Hey. I feel you. That guide is outdated so I've made a new one. Please check
https://bitbucket.org/brbl/love2d-admob ... nstruction
Not all heroes wear capes :) (Unless you do)
User avatar
jojomickymack
Prole
Posts: 45
Joined: Tue Dec 26, 2017 4:52 pm

Re: Help Building Android APK

Post by jojomickymack »

Hey, I would recommend checking out qubodup's tutorials and scripts for compiling an android apk. He makes it really simple and it's well worth the price tag (free). Actually it's worth a lot more than that, but payment isn't required.
https://qubodup.itch.io/startgamedev

also, this might already be known, but you can actually execute .love files on android using this app
https://play.google.com/store/apps/deta ... roid&hl=en

That's not going to help you get your app into the play store, but it really is nice to be able to fire up your game on android without having to deal with compiling/signing/ and pushing your apk to the device for debugging.
Post Reply

Who is online

Users browsing this forum: baconhawka7x, Mathisto and 42 guests