Android build failed

Tired of this errors using ndk r8b jdk6 and leteset sdk.

With the latest HXCPP (and for Android 6 support), I believe you need a newer Android NDK, I’m currently using r13b, just download here, extract to a directory you want, then update your “~/.lime/config.xml” (“C:\Users(your name).lime\config.xml” on Windows) with the updated path

Hi singmajesty,

I updated paths for ./lime/config.xml and /home/xphereS/xcvpp_config.xml as follows:

.lime/config.xml
 
<?xml version="1.0" encoding="utf-8"?>
<config>
   
    <section id="defines">
       
        <set name="ANDROID_SETUP" value="true" />
                <set name="ANDROID_NDK_ROOT" value="/opt/android-ndk-r13b" />
        <set name="ANDROID_SDK" value="/opt/android-sdk" />
       
    </section>
   
</config>
 
 
hxcpp_config.xml
<!--
 
  This file will get included twice - once at the beginning - once at the end.
 
  The first time though, the "vars" section is parsed, and this is where you can
   set variables to control the setup of the standard compilers and install paths etc.
 
  The second time, the "exes" section is parsed, and you can modify the linkers/compilers
   by adding flags to these executables.
 
-->
 
<xml>
 
  <!-- This section is parses at the beginning of the build .... -->
  <section id="vars">
       
        <set name="SDK_ROOT" value="/home/xpheres/Android/Sdk" />
        <set name="ANDROID_SETUP" value="true" />
        <set name="ANDROID_NDK_ROOT" value="/opt/android-ndk-r13b" />
        <set name="ANDROID_NDK_DIR" value="/opt/android-ndk-r13b" />
        <set name="ANDROID_SDK" value="/opt/android-sdk" />
        <set name="ANT_HOME" value="/opt/apache-ant" />
        <set name="JAVA_HOME" value="/home/xpheres/SDKs//java_jdk" />
       
    </section>
 
 
  <!-- Use this section to add flags to the compilers and linkers -->
  <section id="exes">
 
     <!-- Compiling on windows ... -->
     <compiler id="MSVC" if="windows">
        <!-- Example adding a build flag -->
        <!-- <flag value = "-Ie:/VS8//PlatformSDK/Include"/> -->
     </compiler>
 
     <!-- Linking on windows ... -->
     <linker id="dll" if="windows">
        <!-- Add library paths for windows (DirectX needed for building NME) -->
        <!-- <flag value = "-libpath:e:\VS8\DirectXSDK\Lib\x86"/>
        <flag value = "-libpath:e:/VS8/PlatformSDK/Lib"/> -->
     </linker>
 
     <!-- And for linking executables -->
     <linker id="exe" if="windows">
        <!-- <flag value = "-libpath:e:/VS8/PlatformSDK/Lib"/> -->
     </linker>
 
  </section>
 
</xml>

The Java_jdk path however does not exist and I can not find the real path for java_jdk

After compiling with path to the last NDK r13b I receive new lines at the end of the log but It still does not compile:

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-r13b
Detected Android NDK r13
Detected Android toolchain: arm-linux-androideabi-4.9
Detected Android host: linux-x86_64
Using Android NDK platform: android-9
 
 - Adding path: /opt/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/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 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-r13b/platforms/android-9/arch-arm -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/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
 - Running command: arm-linux-androideabi-g++ -I/home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/__pch/haxe -Iinclude --sysroot=/opt/android-ndk-r13b/platforms/android-9/arch-arm -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/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 -x c++ -Wno-invalid-offsetof -frtti -std=c++11 ./src/openfl/utils/_Object/Object_Impl_.cpp -o/home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/e874568b_Object_Impl_.obj
 - Running command: arm-linux-androideabi-g++ -I/home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/__pch/haxe -Iinclude --sysroot=/opt/android-ndk-r13b/platforms/android-9/arch-arm -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/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 -x c++ -Wno-invalid-offsetof -frtti -std=c++11 ./src/openfl/utils/_Endian/Endian_Impl_.cpp -o/home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/bc698ca4_Endian_Impl_.obj
 - Running command: arm-linux-androideabi-g++ -I/home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/__pch/haxe -Iinclude --sysroot=/opt/android-ndk-r13b/platforms/android-9/arch-arm -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/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 -x c++ -Wno-invalid-offsetof -frtti -std=c++11 ./src/openfl/ui/_MultitouchInputMode/MultitouchInputMode_Impl_.cpp -o/home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/87948c01_MultitouchInputMode_Impl_.obj
 - Running command: arm-linux-androideabi-g++ -I/home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/__pch/haxe -Iinclude --sysroot=/opt/android-ndk-r13b/platforms/android-9/arch-arm -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/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 -x c++ -Wno-invalid-offsetof -frtti -std=c++11 ./src/openfl/text/_TextFieldType/TextFieldType_Impl_.cpp -o/home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/10dc3f35_TextFieldType_Impl_.obj
 
Error: Error while running command
arm-linux-androideabi-g++ -I/home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/__pch/haxe -Iinclude --sysroot=/opt/android-ndk-r13b/platforms/android-9/arch-arm -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/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 -x c++ -Wno-invalid-offsetof -frtti -std=c++11 ./src/openfl/utils/_Endian/Endian_Impl_.cpp -o/home2/bodhi64/archivos/programas/MisAPPS/haxe/flixel-demos/Arcade/MinimalistTD/export/android/obj/obj/android-v7/bc698ca4_Endian_Impl_.obj
 
./src/openfl/utils/_Endian/Endian_Impl_.cpp:8:21: error: expected constructor, destructor, or type conversion before '(' token
 HX_LOCAL_STACK_FRAME(_hx_pos_f2873c031a8a146e_11_fromString,"openfl.utils._Endian.Endian_Impl_","fromString",0x910e541f,"openfl.utils._Endian.Endian_Impl_.fromString","openfl/utils/Endian.hx",11,0xb1ee6086)