Prerequisites:
Your android NDK path set in the studio preference should contain a special character.
e.g Mine is : /Users/lokeshchoudhary/Desktop/AndroidNDK's/android-ndk-r9d
You can have any other special characters.
I could reproduce it with $ , & , * , @.
Description:
1. Create an android module in studio.
2. Build the module.
Actual Result:
1. We get the following error:
/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20140528144113/module/android/build.xml:326: The following error occurred while executing this line:
/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20140528144113/module/android/build.xml:281: exec returned: 2 You may need to install the Command Line Tools package through XCode, in case you haven't done so yet.
2. If we do an ant built we get the following error:
Buildfile: /Users/lokeshchoudhary/Desktop/workspaces/comerica_workspcae/android_module/android/build.xml
python.set.exec:
python.check:
[echo] Testing for Python
[exec] Python 2.7.2
init:
process.annotations:
generate.v8.bindings:
[java] Generating /Users/lokeshchoudhary/Desktop/workspaces/comerica_workspcae/android_module/android/build/generated/jni/com.app.androidmodule.AndroidModuleModule.h
[java] Generating /Users/lokeshchoudhary/Desktop/workspaces/comerica_workspcae/android_module/android/build/generated/jni/com.app.androidmodule.AndroidModuleModule.cpp
[java] Generating /Users/lokeshchoudhary/Desktop/workspaces/comerica_workspcae/android_module/android/build/generated/jni/com.app.androidmodule.ExampleProxy.h
[java] Generating /Users/lokeshchoudhary/Desktop/workspaces/comerica_workspcae/android_module/android/build/generated/jni/com.app.androidmodule.ExampleProxy.cpp
generate.bindings:
pre.compile:
js.compile:
ndk.build:
[copy] Copying 43 files to /var/folders/35/nwgw558n55951fnpxmxkjqmr0000gp/T/lokeshchoudhary/android_module-generated
[exec] usage: dirname path
[exec] make: /Users/lokeshchoudhary/build/core/build-local.mk: No such file or directory
[exec] make: *** No rule to make target `/Users/lokeshchoudhary/build/core/build-local.mk'. Stop.
BUILD FAILED
/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20140528144113/module/android/build.xml:326: The following error occurred while executing this line:
/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20140528144113/module/android/build.xml:281: exec returned: 2
Total time: 2 seconds
3. If the special char in the NDK path is removed the module build successfully, using both methods.
Expected Result:
1. The module should be built without any errors
See notes http://developer.android.com/tools/sdk/ndk/index.html for version 7b: "Fixed a problem where special characters in files or paths, other than spaces and quotes, were not correctly handled" (I know this is on Windows). This makes me think there may be a native NDK issue with quotes. What if you try (without involving Titanium at all) compiling something with the NDK with the same character in the path? Also, NDK is based on GNU Make, which makes me think other special characters that likely have meanings in the shell might cause problems. Try it with something like umlauts. _maybe related_? http://comments.gmane.org/gmane.comp.gnu.make.devel/949
[~lchoudhary] Can you see if this is possible to have occur with Native?
I am looking in to making a module natively will update the thread accordingly.
[~bhatfield] Can you please confirm this is noted in our documentation?
[~bhatfield] I would add a note. If we have one that talks about not having spaces in the path, I would add it there (as that's also a NDK restriction). This is an "Android issue".
Added a note in the Software Locations guide under the Windows section and in the Installing Android NDK guide