2015年1月4日 星期日

Build Android Module on Windows 7

when build an android module in Ti Studio 3.4.1,
build fail and saying cannot run program /ndk-build.cmd

Error message:
ndk.build:
        [copy] Copying 9 files to C:\Users\test\AppData\Local\Temp\test\compression-generated
 
BUILD FAILED
C:\ProgramData\Application Data\Titanium\mobilesdk\win32\3.4.1.GA\module\android\build.xml:326: The following error occurred while executing this line:
C:\ProgramData\Application Data\Titanium\mobilesdk\win32\3.4.1.GA\module\android\build.xml:281: Execute failed: java.io.IOException: Cannot run program "\ndk-build.cmd" (in directory "C:\Users\bpoon\AppData\Local\Temp\bpoon\compression-generated"): CreateProcess error=2, ¨t²??¨ì«ü©

To resolve,

Preferences > Studio > Platforms > Android > set Android NDK Home


Alternative way:
1. edit project's build.xml , add property:
<property name="ndk.build" value="D:/android-ndk-r10d/ndk-build.cmd" />

2. Go to http://gnuwin32.sourceforge.net/packages.html, download gperf installer. execute it and gperf will be installed in C:\Program Files\GnuWin32\bin

3. copy the installed gperf.exe file to C:\Windows\System32




沒有留言:

張貼留言