Need help building LOVE for android on linux

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
joker
Prole
Posts: 10
Joined: Tue Jan 31, 2017 2:58 am

Need help building LOVE for android on linux

Post 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?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Need help building LOVE for android on linux

Post by raidho36 »

Looks like you did not install the toolchain properly.
joker
Prole
Posts: 10
Joined: Tue Jan 31, 2017 2:58 am

Re: Need help building LOVE for android on linux

Post 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?
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Need help building LOVE for android on linux

Post 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
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
joker
Prole
Posts: 10
Joined: Tue Jan 31, 2017 2:58 am

Re: Need help building LOVE for android on linux

Post 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.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Need help building LOVE for android on linux

Post by Positive07 »

Try the oracle one, but I can't help much sorry
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], AkirIkasu and 5 guests