Page 1 of 1

Need help building LOVE for android on linux

Posted: Thu Feb 02, 2017 3:40 am
by joker
When I run ndk-build on android-sdl2 I get this error.
make: ~/bin/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86/bin/arm-linux-androideabi-g++: Command not found
~/bin/android-ndk-r13b/build/core/build-binary.mk:499: recipe for target 'obj/local/armeabi/objs/love/src/love.o' failed
make: *** [obj/local/armeabi/objs/love/src/love.o] Error 127
When I run ant debug I get this error
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[aapt] /opt/android-sdk/build-tools/25.0.2/aapt: 3: /opt/android-sdk/build-tools/25.0.2/aapt: Syntax error: Unterminated quoted string

BUILD FAILED
/opt/android-sdk/tools/ant/build.xml:649: The following error occurred while executing this line:
/opt/android-sdk/tools/ant/build.xml:694: null returned: 2

Total time: 0 seconds
cp: cannot stat 'bin/love_android_sdl2-debug.apk': No such file or directory
What am I doing wrong?

Re: Need help building LOVE for android on linux

Posted: Thu Feb 02, 2017 3:54 am
by raidho36
Looks like you did not install the toolchain properly.

Re: Need help building LOVE for android on linux

Posted: Thu Feb 02, 2017 4:53 am
by joker
I downloaded android NDK from here https://developer.android.com/ndk/downloads/index.html which lists a 64-bit zip file but I am on 32-bit. Will that be a problem?

How do install the toolchain?

Re: Need help building LOVE for android on linux

Posted: Thu Feb 02, 2017 7:16 am
by Positive07
Why would you install a 64 bit program in a 32 bit machine?

It took me 4 minutes to Google "Android NDK Linux 32bits" and find this link that has download links for older versions of the NDK, it looks like NDK r10d has a Linux x86 binary which should work in 32bits machine, the newer ones don't support Linux 32 bits

Re: Need help building LOVE for android on linux

Posted: Thu Feb 02, 2017 10:15 am
by joker
Thanks for the solution Positive07. I was able to run ndk-build on love-android-sdl2 successfully unfortunately it doesn't end there. The build-tools and platform-tools I downloaded using android sdk manager is only supported for linux 64-bit versions. I got those files for 32-bit system here
https://computernerddiaries.wordpress.c ... ed-string/

After I ran ant debug the console showed 3 warnings. Build was successful but there is no debug love_android_sdl2-debug.apk in the bin folder instead there are two other apk files: love-android-debug.apk and love-android-debug-unaligned.apk.

When I copy them to my mobile and try to install it says App not installed.

EDIT: I installed open JDK instead of oracle JDK. Hope it doesn't make a difference.

Re: Need help building LOVE for android on linux

Posted: Fri Feb 03, 2017 3:38 am
by Positive07
Try the oracle one, but I can't help much sorry