[TIMOB-13295] Unable to build Android module with 3.0.2
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2016-08-29T19:36:27.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | CLI |
Labels | n/a |
Reporter | Jamie Buckley |
Assignee | Chris Barber |
Created | 2013-04-01T18:14:32.000+0000 |
Updated | 2017-03-22T18:24:47.000+0000 |
Description
When user attempts to package an android module they receive an error.
/Users/xxxx/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/module/android/build.xml:371: The following error occurred while executing this line:
/Users/xxxx/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/module/android/build.xml:326: exec returned: 2You may need to install the Command Line Tools package through XCode, in case you haven't done so yet.
with Ant and terminal,in the module folder, User enters "ant". Then they receive another error during the "ndk.build" task :
[exec] In file included from /usr/include/sys/_types.h:33:0,
[exec] from /usr/include/_types.h:27,
[exec] from /usr/include/../include/stddef.h:69,
[exec] from /Users/xxxx/android-ndk-r8e/sources/cxx-stl/stlport/stlport/stddef.h:34,
[exec] from /Users/xxxx/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/android/native/include/v8stdint.h:33,
[exec] from /Users/xxxx/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/android/native/include/v8.h:41,
[exec] from /Users/xxxx/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/android/native/include/Proxy.h:11,
[exec] from jni/com.mainline.android.push.ExampleProxy.h:12,
[exec] from jni/com.mainline.android.push.ExampleProxy.cpp:10:
[exec] /usr/include/machine/_types.h:34:24: fatal error: arm/_types.h: No such file or directory
[exec] compilation terminated.
The user has the Android NDK installed and it is visible in their PATH.
I'm seeing this as well on Mountain Lion, 10.8.3. This bug is present if I set "titanium.platform" to 3.0.0.GA or 3.0.2.GA.
I was able to resolve this by changing the Android.mk to use the android ndk platform include instead. In Android.mk I changed -I$(SYSROOT)/usr/include to -I$(NDK_PATH)/platforms/$(TARGET_PLATFORM)/arch-arm/usr/include In the main build.xml I had to export the ndk path by adding
David, can you be more specific as to what you did to fix this locally? I tried to follow what you did but couldn't find the files/entries that you spoke of. Is this going to be addressed in the next release?
The Ant build for modules is deprecated in favor of the new module build system introduced in Titanium SDK 4.0.0. Furthermore, Android modules compile just fine with Titanium SDK 5.5.0 and are not dependent on Xcode.
Closing ticket as invalid.