Building for andriod [solved]

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
TheHistoricApple
Prole
Posts: 26
Joined: Sun Jan 15, 2017 6:46 am

Building for andriod [solved]

Post by TheHistoricApple »

So recently I've been trying to build for android. However i cannot build the apk using the android wiki, i heard the current sdk tools is not compatible with the method used, which sdk version would i use?


edit: The error occurs when using

Code: Select all

ant debug
it says that the sdk directory doesn't have the build.xml



edit2: i got the apk to build and run, however im trying to use https://love2d.org/forums/viewtopic.php?f=5&t=82166 to put ads on (this is the repo i used to build the apk) my problem is when i use

Code: Select all

love.system.createBanner()
or any of the functions provided it doesn't work?
Last edited by TheHistoricApple on Tue May 30, 2017 6:41 am, edited 4 times in total.
User avatar
Macsek
Prole
Posts: 11
Joined: Sat May 07, 2016 3:25 pm

Re: Building for andriod

Post by Macsek »

This also occurs for me...
The project recently switched from ant to gradle but not all docs are updated....
Try reverting to commit c025e5e with:

Code: Select all

git checkout c025e5e
Then run ndk-build and then finally ant debug
TheHistoricApple
Prole
Posts: 26
Joined: Sun Jan 15, 2017 6:46 am

Re: Building for andriod

Post by TheHistoricApple »

where exactly do i run

Code: Select all

git checkout c025e5e
?

doing so in the love repo results in

Code: Select all

C:\loveandroid>git checkout c025e5e
'git' is not recognized as an internal or external command,
operable program or batch file.
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Building for andriod

Post by davisdude »

You need to install git and add it to your path (which may already be done for you depending on the install; before running the last step open try running `git` on the command line to see if it works)
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
TheHistoricApple
Prole
Posts: 26
Joined: Sun Jan 15, 2017 6:46 am

Re: Building for andriod

Post by TheHistoricApple »

so i cloned the repo using git used

Code: Select all

git checkout c025e5e
Which worked.
Then i used

Code: Select all

ndk-build
which worked (im using version r9d)
then i went to use

Code: Select all

ant debug
and got the same error i've been getting

Code: Select all

C:\love-android-sdl2>ant debug
Buildfile: C:\love-android-sdl2\build.xml

BUILD FAILED
C:\love-android-sdl2\build.xml:91: Cannot find C:\Users\Jma227\AppData\Local\Android\Sdk\tools\ant\build.xml imported from C:\love-android-sdl2\build.xml

Total time: 0 seconds
i don't understand what i did wrong.


edit:

i just found this https://stackoverflow.com/questions/429 ... -remove-it

ganna try it and see if it works


edit2: following the download link from https://stackoverflow.com/questions/429 ... -remove-it downloaded the sdk tools before they removed the ant scripts, then i replaced the tools folder in my sdk dir with the one from the download and it worked perfectly!
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 0 guests