1. Make sure you have android NDK r13 downloaded & set in the studio preferences.
2. Create an android module.
3. Package the android module from studio or CLI.
1. Module packaging fails.
Command
/usr/local/bin/node /Users/lchoudhary/.appcelerator/install/5.5.0/package/node_modules/titanium/lib/titanium.js build run --platform android --project-dir /Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android --build-only -l trace
[INFO] javac Max Memory: 256M
[INFO] javac Source: 1.6
[INFO] javac Target: 1.6
[INFO] dx Max Memory: 1024M
[INFO] buildBinClassesDir: /Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/classes
[INFO] Assets Dir: /Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/assets
[INFO] Documentation Dir: /Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/documentation
[INFO] Example Dir: /Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/example
[INFO] Platform Dir: /Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/platform
[INFO] Resources Dir: /Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/Resources
Generating java files from the .aidl files
[INFO] No aidl files to compile
Compiling Module Java source files
[INFO] Building Java source files: /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/javac "-J-Xmx256M" "-encoding" "utf8" "-classpath" "/Users/lchoudhary/Desktop/android-sdk-macosx/platforms/android-23/android.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/lib/closure-compiler.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/lib/titanium-debug.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/lib/titanium-profiler.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/lib/titanium-verify.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-accelerometer.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-analytics.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-android.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-app.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-appcompat.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-calendar.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-cardview.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-contacts.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-database.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-filesystem.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-geolocation.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-gesture.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-locale.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-map.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-media.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-network.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-platform.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-ui.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-utils.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-xml.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/android-support-v4.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/android-support-v7-appcompat.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/aps-analytics.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/cardview-v7-23.0.1.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/freemarker.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/jaxen-1.1.1.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/json_simple-1.1.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/kroll-apt.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/kroll-common.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/kroll-v8.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/nineoldandroids-appc-2.4.0.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/ti-commons-codec-1.3.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/titanium.jar" "-d" "/Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/classes" "-target" "1.6" "-g" "-source" "1.6" "@/Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/java-sources.txt" "-processor" "org.appcelerator.kroll.annotations.generator.KrollJSONGenerator" "-s" "/Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/generated/json" "-Akroll.jsonFile=mod551.json" "-Akroll.jsonPackage=org.appcelerator.titanium.bindings" "-Akroll.checkTiContext=true"
Generating runtime bindings
[INFO] Generate v8 bindings: /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java "-classpath" "/Users/lchoudhary/Desktop/android-sdk-macosx/platforms/android-23/android.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/lib/closure-compiler.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/lib/titanium-debug.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/lib/titanium-profiler.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/lib/titanium-verify.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-accelerometer.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-analytics.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-android.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-app.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-appcompat.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-calendar.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-cardview.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-contacts.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-database.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-filesystem.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-geolocation.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-gesture.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-locale.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-map.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-media.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-network.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-platform.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-ui.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-utils.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/modules/titanium-xml.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/android-support-v4.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/android-support-v7-appcompat.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/aps-analytics.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/cardview-v7-23.0.1.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/freemarker.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/jaxen-1.1.1.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/json_simple-1.1.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/kroll-apt.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/kroll-common.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/kroll-v8.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/nineoldandroids-appc-2.4.0.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/ti-commons-codec-1.3.jar:/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/titanium.jar" "org.appcelerator.kroll.annotations.generator.KrollBindingGenerator" "/Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/generated/jni" "true" "com.app.mod551" "/Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/generated/json/org/appcelerator/titanium/bindings/mod551.json"
Producing [ModuleName]Bootstrap files using /Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/generated/json/org/appcelerator/titanium/bindings/mod551.json
Generating BootstrapJS.cpp from bootstrap.js
Running the stock Android NDK ndk-build
[INFO] Starting directory: /Users/lchoudhary/Desktop
[INFO] New directory: /Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/generated
[ERROR] Failed to run ndk-build
[ERROR]
[ERROR] jni/Android.mk:35: warning: overriding commands for target /Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/generated/KrollGeneratedBindings.cpp'
[ERROR] jni/Android.mk:35: warning: ignoring old commands for target
/Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/generated/KrollGeneratedBindings.cpp'
[ERROR] jni/Android.mk:35: warning: overriding commands for target /Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/generated/KrollGeneratedBindings.cpp'
[ERROR] jni/Android.mk:35: warning: ignoring old commands for target
/Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/generated/KrollGeneratedBindings.cpp'
[ERROR] warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option]
[ERROR] In file included from jni/com.app.mod551.ExampleProxy.cpp:12:
[ERROR] /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:57:49: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/sprintf/lib/sprintf.js:231
throw new Error('[sprintf] ' + _fmt);
^
Error: [sprintf] %ld,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE',#define LOGE(tag, ...) LOG(ERROR, tag, __VA_ARGS__), ^~~~~~~~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG',#define LOG(level, tag, ...) __android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS__), ^~~~~~~~~~~,jni/com.app.mod551.ExampleProxy.cpp:129:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security], LOGE(TAG, error);, ^~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE',#define LOGE(tag, ...) LOG(ERROR, tag, __VA_ARGS__), ^~~~~~~~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG',#define LOG(level, tag, ...) __android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS__), ^~~~~~~~~~~,jni/com.app.mod551.ExampleProxy.cpp:194:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security], LOGE(TAG, error);, ^~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE',#define LOGE(tag, ...) LOG(ERROR, tag, __VA_ARGS__), ^~~~~~~~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG',#define LOG(level, tag, ...) __android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS__), ^~~~~~~~~~~,jni/com.app.mod551.ExampleProxy.cpp:246:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security], LOGE(TAG, error);, ^~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE',#define LOGE(tag, ...) LOG(ERROR, tag, __VA_ARGS__), ^~~~~~~~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG',#define LOG(level, tag, ...) __android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS__), ^~~~~~~~~~~,jni/com.app.mod551.ExampleProxy.cpp:314:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security], LOGE(TAG, error);, ^~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE',#define LOGE(tag, ...) LOG(ERROR, tag, __VA_ARGS__), ^~~~~~~~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG',#define LOG(level, tag, ...) __android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS__), ^~~~~~~~~~~,jni/com.app.mod551.ExampleProxy.cpp:373:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security], LOGE(TAG, error);, ^~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE',#define LOGE(tag, ...) LOG(ERROR, tag, __VA_ARGS__), ^~~~~~~~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG',#define LOG(level, tag, ...) __android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS__), ^~~~~~~~~~~,7 warnings generated.,warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option],In file included from jni/com.app.mod551.Mod551Module.cpp:12:,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:57:49: warning: format specifies type 'int' but the argument has type 'long' [-Wformat], LOGE(tag, "Finished %s (%d ms)", description, AndroidUtil::getCurrentMillis() - start);, ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~, %ld,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE',#define LOGE(tag, ...) LOG(ERROR, tag, __VA_ARGS__), ^~~~~~~~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG',#define LOG(level, tag, ...) __android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS__), ^~~~~~~~~~~,jni/com.app.mod551.Mod551Module.cpp:130:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security], LOGE(TAG, error);, ^~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE',#define LOGE(tag, ...) LOG(ERROR, tag, __VA_ARGS__), ^~~~~~~~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG',#define LOG(level, tag, ...) __android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS__), ^~~~~~~~~~~,jni/com.app.mod551.Mod551Module.cpp:185:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security], LOGE(TAG, error);, ^~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE',#define LOGE(tag, ...) LOG(ERROR, tag, __VA_ARGS__), ^~~~~~~~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG',#define LOG(level, tag, ...) __android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS__), ^~~~~~~~~~~,jni/com.app.mod551.Mod551Module.cpp:244:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security], LOGE(TAG, error);, ^~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE',#define LOGE(tag, ...) LOG(ERROR, tag, __VA_ARGS__), ^~~~~~~~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG',#define LOG(level, tag, ...) __android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS__), ^~~~~~~~~~~,5 warnings generated.,warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option],In file included from jni/../Mod551Bootstrap.cpp:12:,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:57:49: warning: format specifies type 'int' but the argument has type 'long' [-Wformat], LOGE(tag, "Finished %s (%d ms)", description, AndroidUtil::getCurrentMillis() - start);, ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~, %ld,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:34:40: note: expanded from macro 'LOGE',#define LOGE(tag, ...) LOG(ERROR, tag, __VA_ARGS__), ^~~~~~~~~~~,/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/native/include/AndroidUtil.h:14:74: note: expanded from macro 'LOG',#define LOG(level, tag, ...) __android_log_print(_LOG_LEVEL(level), tag, __VA_ARGS__), ^~~~~~~~~~~,In file included from jni/../Mod551Bootstrap.cpp:17:,/Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/generated/KrollGeneratedBindings.gperf:14:8: error: forward declaration of struct cannot have a nested name specifier,struct titanium::bindings::BindEntry;, ^~~~~~~~~~~~~~~~~~~~,2 warnings and 1 error generated.,make: *** [/Users/lchoudhary/Desktop/workspaces/workspace_2016/mod551/android/build/generated/obj/local/armeabi/objs/com.app.mod551/__/Mod551Bootstrap.o] Error 1"
at Function.str_format.parse (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/sprintf/lib/sprintf.js:231:11)
at str_format (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/sprintf/lib/sprintf.js:75:48)
at str_format.format (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/sprintf/lib/sprintf.js:163:22)
at str_format (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/sprintf/lib/sprintf.js:77:28)
at [object Object].patchedLog [as log] (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/cli/commands/build.js:391:76)
at target.(anonymous function) (/Users/lchoudhary/.appcelerator/install/5.5.0/package/node_modules/titanium/node_modules/winston/lib/winston/common.js:54:18)
at Array.forEach (native)
at AndroidModuleBuilder.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/cli/commands/_buildModule.js:1073:31)
at ChildProcess.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/lib/subprocess.js:60:3)
---------------------------------------------
at Object.run (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/lib/subprocess.js:59:8)
at AndroidModuleBuilder.tasks (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/cli/commands/_buildModule.js:1060:21)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
at Immediate.iterate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
at processImmediate [as _immediateCallback] (timers.js:383:17)
---------------------------------------------
at Object.setImmediate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
at AndroidModuleBuilder.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/cli/commands/_buildModule.js:1051:4)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
at iterate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
at async.forEachOfSeries.async.eachOfSeries (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:281:9)
---------------------------------------------
at Object.setImmediate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
at AndroidModuleBuilder.jsToC (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/cli/commands/_buildModule.js:1021:2)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
at Immediate.iterate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
---------------------------------------------
at Object.setImmediate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
at AndroidModuleBuilder.compileJS (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/cli/commands/_buildModule.js:901:10)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
at Immediate.iterate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
---------------------------------------------
at Object.setImmediate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
at AndroidModuleBuilder.compileJsClosure (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/cli/commands/_buildModule.js:821:10)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
at iterate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:274:29
---------------------------------------------
at Object.setImmediate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
at AndroidModuleBuilder.nativeContext.moduleId (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/cli/commands/_buildModule.js:778:4)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
at Immediate.iterate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
---------------------------------------------
at Object.setImmediate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
at AndroidModuleBuilder.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/cli/commands/_buildModule.js:747:4)
at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
at iterate (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
at async.forEachOfSeries.async.eachOfSeries (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:281:9)
---------------------------------------------
at Object.run (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/node_modules/node-appc/lib/subprocess.js:59:8)
at AndroidModuleBuilder.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA/android/cli/commands/_buildModule.js:474:20)
at /Users/lchoudhary/.appcelerator/install/5.5.0/package/node_modules/titanium/lib/hook.js:256:13
at /Users/lchoudhary/.appcelerator/install/5.5.0/package/node_modules/titanium/node_modules/async/lib/async.js:697:13
at /Users/lchoudhary/.appcelerator/install/5.5.0/package/node_modules/titanium/node_modules/async/lib/async.js:52:16
at iterate (/Users/lchoudhary/.appcelerator/install/5.5.0/package/node_modules/titanium/node_modules/async/lib/async.js:263:24)
at async.forEachOfSeries.async.eachOfSeries (/Users/lchoudhary/.appcelerator/install/5.5.0/package/node_modules/titanium/node_modules/async/lib/async.js:284:9)
at _parallel (/Users/lchoudhary/.appcelerator/install/5.5.0/package/node_modules/titanium/node_modules/async/lib/async.js:688:9)
at Object.async.series (/Users/lchoudhary/.appcelerator/install/5.5.0/package/node_modules/titanium/node_modules/async/lib/async.js:710:9)
1. Module packaging should be successfull
Officially we are supporting ndk 11 for Release 6.0.0 so this is ok for now.
This issue exists with NDK r14 as well.
Hello - this issue is still present in NDK r15 - when is this expected to be resolved? What's the agreed workaround / fix for this while we're waiting for this to be fixed?
[~plancaster] We are looking at this now and will let you know what is possible.
This is a bit of a architecture challenge. We will be discussing possible solutions next week and I should have more info.
At the moment, we only support building with Android NDK r12. We can't reliably build modules with any other versions older or newer than r12. The technical reason why is because we're using a precompiled Google v8 JavaScript C++ .so library on Android. Since the v8 library involves using publicly exported C++ classes/methods, this means C++ name mangling is involved, which is not standardized. How C++ name mangling works will likely be different between different C++ compilers and compiler versions. Please note that node.js has this same exact limitation (it too uses v8) and is why it uses the "npm" package manager to ensure all native modules are compiled with the same C++ compiler version, avoiding the name mangling issue. (This is also known in C++ land as an ABI compatibility issue.) We will likely switch to a newer Android NDK in the future, but when we do, all modules will have to compile with the same NDK version v8 was built with too for the reasons I've mentioned above. The real issue here is that we need a much more descriptive error message when using an unsupported Android NDK version. This issue should only happen when changing the ANDROID_NDK environment variable to an unsupported version by hand.
This will be fixed when updating V8 in
7.0.0
, our newer V8 builds are compatible with NDK 12, 13, 14 and 15.master: https://github.com/appcelerator/titanium_mobile/pull/9561
FR Passed. With the fix modules can be created & packaged/built using android NDK 12, 13, 14, 15. Closing. Studio Ver: 4.10.0.201709271713 SDK Ver: 7.0.0.v20171108185342 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.10 Appc CLI: 6.3.0 Ti CLI Ver: 5.0.14 Alloy Ver: 1.10.7 Node Ver: 7.10.1 Java Ver: 1.8.0_101 NDK: 12, 13, 14, 15