Unable to compile for android

Hi, I’m not able to compile for android, any help to resolve this issue will be welcome.

I receive the following errors:


openfl build android -v
 .d88 88b.                             888888b 888 
d88P" "Y88b                            888     888 
888     888                            888     888 
888     888 88888b.   .d88b.  88888b.  8888888 888 
888     888 888 "88b d8P  Y8b 888 "88b 888     888 
888     888 888  888 88888888 888  888 888     888 
Y88b. .d88P 888 d88P Y8b.     888  888 888     888 
 "Y88 88P"  88888P"   "Y8888  888  888 888     "Y888P 
            888                                   
            888                                   

OpenFL Command-Line Tools (3.6.1-LQBZc4)

Initializing project...
Using project file: /home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/Project.xml
Reading HXCPP config: /home/xpheres/.hxcpp_config.xml
Using target platform: ANDROID

Running command: UPDATE
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/dependencies/extension-api/AndroidManifest.xml -> export/android/bin//deps/extension-api/AndroidManifest.xml
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/dependencies/extension-api/src/org/haxe/extension/Extension.java -> export/android/bin//deps/extension-api/src/org/haxe/extension/Extension.java
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/dependencies/extension-api/src/org/haxe/HXCPP.java -> export/android/bin//deps/extension-api/src/org/haxe/HXCPP.java
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/dependencies/extension-api/src/org/haxe/lime/HaxeObject.java -> export/android/bin//deps/extension-api/src/org/haxe/lime/HaxeObject.java
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/dependencies/extension-api/src/org/haxe/lime/Value.java -> export/android/bin//deps/extension-api/src/org/haxe/lime/Value.java
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/dependencies/extension-api/src/org/haxe/lime/Lime.java -> export/android/bin//deps/extension-api/src/org/haxe/lime/Lime.java
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/dependencies/extension-api/build.xml -> export/android/bin//deps/extension-api/build.xml
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/dependencies/extension-api/project.properties -> export/android/bin//deps/extension-api/project.properties
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/android/template/AndroidManifest.xml -> export/android/bin//AndroidManifest.xml
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/android/template/src/org/haxe/lime/GameActivity.java -> export/android/bin//src/org/haxe/lime/GameActivity.java
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/android/template/src/org/haxe/lime/MainView.java -> export/android/bin//src/org/haxe/lime/MainView.java
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/android/template/build.xml -> export/android/bin//build.xml
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/android/template/libs/armeabi/readme.txt -> export/android/bin//libs/armeabi/readme.txt
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/android/template/project.properties -> export/android/bin//project.properties
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/android/MainActivity.java -> export/android/bin//src/com/example/myapp/MainActivity.java
 - Copying template file: /home/xpheres/haxelib/openfl/3,6,1/templates/haxe/ApplicationMain.hx -> export/android/haxe/ApplicationMain.hx
 - Copying template file: /home/xpheres/haxelib/openfl/3,6,1/templates/haxe/NMEPreloader.hx -> export/android/haxe/NMEPreloader.hx
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/haxe/ApplicationMain.hx -> export/android/haxe/ApplicationMain.hx
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/haxe/lime/AssetData.hx -> export/android/haxe/lime/AssetData.hx
 - Copying template file: /home/xpheres/haxelib/openfl/3,6,1/templates/legacy/haxe/ApplicationMain.hx -> export/android/haxe/ApplicationMain.hx
 - Copying template file: /home/xpheres/haxelib/openfl/3,6,1/templates/legacy/haxe/NMEPreloader.hx -> export/android/haxe/NMEPreloader.hx
 - Copying template file: /home/xpheres/haxelib/openfl/3,6,1/templates/legacy/haxe/DefaultAssetLibrary.hx -> export/android/haxe/DefaultAssetLibrary.hx
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/android/hxml/debug.hxml -> export/android/haxe/debug.hxml
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/android/hxml/release.hxml -> export/android/haxe/release.hxml
 - Copying template file: /home/xpheres/haxelib/lime/2,9,1/legacy/templates/android/hxml/final.hxml -> export/android/haxe/final.hxml

Running command: BUILD
 - Copying library file: /home/xpheres/haxelib/hxcpp/3,4,2/bin/Android/libstd-v7.so -> export/android/bin/libs/armeabi/libstd.so
 - Copying library file: /home/xpheres/haxelib/hxcpp/3,4,2/bin/Android/libregexp-v7.so -> export/android/bin/libs/armeabi/libregexp.so
 - Copying library file: /home/xpheres/haxelib/hxcpp/3,4,2/bin/Android/libzlib-v7.so -> export/android/bin/libs/armeabi/libzlib.so
 - Copying library file: /home/xpheres/haxelib/lime/2,9,1/legacy/ndll/Android/liblime-legacy-v7.so -> export/android/bin/libs/armeabi/liblime-legacy.so
 - Running command: haxe export/android/haxe/release.hxml -D android -D android-9 -D HXCPP_ARMV7
 - Changing directory: export/android/obj
 - Running command: haxelib run hxcpp Build.xml -DFLX_FOCUS_LOST_SCREEN=1 -DFLX_GAMEPAD=1 -DFLX_JOYSTICK_API=1 -DFLX_KEYBOARD=1 -DFLX_MOUSE=1 -DFLX_NO_DEBUG=1 -DFLX_NO_MOUSE_ADVANCED=1 -DFLX_POINTER_INPUT=1 -DFLX_POST_PROCESS=1 -DFLX_SOUND_SYSTEM=1 -DFLX_SOUND_TRAY=1 -DFLX_TOUCH=1 -DHXCPP_ARMV7=1 -DHXCPP_QUIET=1 -DNAPE_RELEASE_BUILD=1 -Dandroid=1 -Dandroid-9=1 -Dandroid_9=1 -Dflixel=4.2.0 -Dhaxe3=1 -Dhaxe_ver=3.4 -Dhxcpp=3.4.2 -Dhxcpp_api_level=331 -Dlime=2.9.1 -Dlime-legacy=1 -Dlime-native=1 -Dlime_legacy=1 -Dlime_native=1 -Dmobile=1 -Dnative=1 -Dopenfl=3.6.1 -Dopenfl-legacy=1 -Dopenfl-native=1 -Dopenfl_legacy=1 -Dopenfl_native=1 "-Dsource-header=Generated by Haxe 3.4.0" -Dtools=2.9.1 -Dandroid -Dandroid-9 -DHXCPP_ARMV7 -verbose
 __                          
/\ \                                      
\ \ \___    __  _   ___   _____   _____   
 \ \  _ `\ /\ \/'\ /'___\/\ '__`\/\ '__`\ 
  \ \ \ \ \\/>  <//\ \__/\ \ \L\ \ \ \L\ \
   \ \_\ \_\/\_/\_\ \____\\ \ ,__/\ \ ,__/
    \/_/\/_/\//\/_/\/____/ \ \ \/  \ \ \/ 
                            \ \_\   \ \_\ 
                             \/_/    \/_/ 

hxcpp (Haxe C++ Runtime Support) (3.4.2)

Using makefile: Build.xml
Reading HXCPP config: /home/xpheres/.hxcpp_config.xml
No specified toolchain

 - Parsing include: /home/xpheres/haxelib/hxcpp/3,4,2/toolchain/setup.xml
 - Parsing include: /home/xpheres/.hxcpp_config.xml (section "vars")
 - Parsing include: /home/xpheres/haxelib/hxcpp/3,4,2/toolchain/finish-setup.xml
 - Parsing makefile: /home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/Build.xml
 - Parsing include: /home/xpheres/haxelib/hxcpp/3,4,2/build-tool/BuildCommon.xml
 - Parsing include: /home/xpheres/haxelib/hxcpp/3,4,2/toolchain/haxe-target.xml
 - Parsing include: /home/xpheres/haxelib/hxcpp/3,4,2/src/hx/libs/std/Build.xml
 - Parsing include: /home/xpheres/haxelib/hxcpp/3,4,2/src/hx/libs/regexp/Build.xml
 - Parsing include: /home/xpheres/haxelib/hxcpp/3,4,2/src/hx/libs/zlib/Build.xml
 - Parsing include: /home/xpheres/haxelib/hxcpp/3,4,2/toolchain/android-toolchain.xml

Using Android NDK root: /opt/android-ndk
Deduced NDK version 11 from "/opt/android-ndk"/source.properties
Detected Android NDK r11
Detected Android toolchain: arm-linux-androideabi-4.4.3
Detected Android host: linux-x86
Using Android NDK platform: android-9

 - Adding path: /opt/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
 - Parsing include: /home/xpheres/haxelib/hxcpp/3,4,2/toolchain/gcc-toolchain.xml
 - Parsing compiler: /home/xpheres/haxelib/hxcpp/3,4,2/toolchain/common-defines.xml
 - Parsing include: /home/xpheres/.hxcpp_config.xml (section "exes")

Using compile threads: 4

 - Creating directory: /home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj
 - Creating directory: /home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7
 - Creating directory: /home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/__pch
 - Creating directory: /home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/__pch/haxe
Creating PCH directory "/home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/__pch/haxe"
 - Precompile /home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/__pch/haxe/hxcpp.h.gch
 - Running command: arm-linux-androideabi-g++ -Iinclude --sysroot=/opt/android-ndk/platforms/android-9/arch-arm -I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=331 -I/home/xpheres/haxelib/hxcpp/3,4,2/include -Iinclude -fpic -fvisibility=hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums "-D_LINUX_STDDEF_H " -Wno-psabi -DHXCPP_CPP11 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit=10000 -DANDROID=ANDROID -DHX_ANDROID -DHXCPP_ANDROID_PLATFORM=9 -Wa,--noexecstack -O2 -DNDEBUG -c -Wno-invalid-offsetof -frtti -std=c++11 -o /home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/__pch/haxe/hxcpp.h.gch /home/xpheres/haxelib/hxcpp/3,4,2/include/hxcpp.h
cc1plus: error: unrecognized command line option "-std=c++11"
Error: Error while running command
arm-linux-androideabi-g++ -Iinclude --sysroot=/opt/android-ndk/platforms/android-9/arch-arm -I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=331 -I/home/xpheres/haxelib/hxcpp/3,4,2/include -Iinclude -fpic -fvisibility=hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums "-D_LINUX_STDDEF_H " -Wno-psabi -DHXCPP_CPP11 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit=10000 -DANDROID=ANDROID -DHX_ANDROID -DHXCPP_ANDROID_PLATFORM=9 -Wa,--noexecstack -O2 -DNDEBUG -c -Wno-invalid-offsetof -frtti -std=c++11 -o /home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/__pch/haxe/hxcpp.h.gch /home/xpheres/haxelib/hxcpp/3,4,2/include/hxcpp.h

My android libraries:

See my answer here, and see if the newer Android NDK helps you? :slight_smile:

Thanks :slight_smile: