Error on rebuilding Lime for Android

I wanted to try the dev version of Lime for Android but the following appears when I try to rebuild:

C:\HaxeToolkit\haxe\lib\lime>lime rebuild android
x86 Platform: 16
arm Platform: 16
x86_64 Platform: 21
arm_64 Platform: 21
Frameworks should set the minSdkVersion for each APK to these values.

Compiling group: lime
clang++ -Iinclude -Ilib/cairo/include -Ilib/cairo/include/configs/default/ -DLIME_CAIRO -DHAVE_CONFIG_H -DCAIRO_HAS_FT_FONT -Ilib/curl/include/ -DLIME_CURL -DCURL_STATICLIB -Ilib/freetype/include -DLIME_FREETYPE -Ilib/harfbuzz/src -DLIME_HARFBUZZ -DLIBHL_EXPORTS -Ilib/jpeg/ -DLIME_JPEG -Ilib/lzma/src -DLIME_LZMA -Ilib/ogg/include/ -Ilib/vorbis/include/ -DLIME_OGG -Ilib/openal/include/ -DLIME_OPENAL -DLIME_OPENALSOFT -DAL_LIBTYPE_STATIC=1 -DAL_ALEXT_PROTOTYPES -DLIME_OPENGL -Ilib/png/ -Ilib/zlib/ -DLIME_PNG -Ilib/sdl/include/ -Ilib/sdl/include/configs/default/ -DHAVE_LIBC -DLIME_SDL -Ilib/ogg/include/ -Ilib/vorbis/include/ -DLIME_VORBIS -DLIME_ZLIB --target= -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=0(haxe) -IC:/HaxeToolkit/haxe/lib/hxcpp/4,0,52/include -Iinclude -DANDROID=ANDROID -DHX_ANDROID -DHXCPP_ANDROID_PLATFORM= -fvisibility=hidden -ffunction-sections -fstack-protector -fexceptions -c -fpic -Wno-invalid-offsetof -Wno-return-type-c-linkage -Wno-parentheses ... tags=[haxe,static]
 - src/graphics/cairo/CairoBindings.cpp
 - src/media/codecs/vorbis/VorbisBindings.cpp
 - src/backend/sdl/SDLKeyCode.cpp
 - src/graphics/format/JPEG.cpp
 - src/system/ValuePointer.cpp
 - src/math/ColorMatrix.cpp
 - src/text/harfbuzz/HarfbuzzBindings.cpp
 - src/backend/sdl/SDLSystem.cpp
 - src/ui/GamepadEvent.cpp
 - src/ui/TextEvent.cpp
 - src/media/containers/WAV.cpp
Error: error: unknown target triple 'unknown', please use -triple or -arch`

I’m getting the same but only on my MacBook running High Sierra whereas my iMac running Mojave it builds fine. The other difference between the two is that on the MacBook I’m running Android Studio as that was the only download available but on the iMac I already had things setup on that it uses the older non-Studio Android stuff - so just the SDK and NDK.

So basically, with Android Studio/High Sierra combo I can’t do lime rebuild android -clean because of the above error.

Is the NDK newer than what HXCPP supports?

1 Like

Yes, I was using NDK r20b. I tried with r15c and the problem was solved :grinning:

Is r15c still the latest supported NDK?

Yep - worked for me to - I was on r20 as well and now dropped to r15c.

Thanks @singmajesty

I believe this is still an HXCPP issue

…but if someone can tell me I’m wrong and HXCPP supports a newer NDK but Lime needs changes to support the newer NDK then let me know :slight_smile:

I ran into the same issue today trying lime rebuild android with ANDROID_NDK_ROOT set to NDK r21e. Switching to the older r15c allowed me to continue.

Interestingly, after lime rebuild android completes, I can successfully switch back to r21e and use lime build android to compile an OpenFL project.

So it’s specifically rebuilding the Lime library itself that requires r15c, for some reason.