Page 1 of 1
Building for andriod [solved]
Posted: Mon May 29, 2017 8:11 am
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
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
or any of the functions provided it doesn't work?
Re: Building for andriod
Posted: Mon May 29, 2017 3:16 pm
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:
Then run ndk-build and then finally ant debug
Re: Building for andriod
Posted: Tue May 30, 2017 12:34 am
by TheHistoricApple
where exactly do i run
?
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.
Re: Building for andriod
Posted: Tue May 30, 2017 12:56 am
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)
Re: Building for andriod
Posted: Tue May 30, 2017 2:57 am
by TheHistoricApple
so i cloned the repo using git used
Which worked.
Then i used
which worked (im using version r9d)
then i went to use
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!