创建Titanium android模块时出错258

时间:2012-04-20 06:54:23

标签: titanium titanium-mobile titanium-modules

我正在尝试用钛创建一个Android模块。

我收到以下错误:

Buildfile: C:\Users\dhairya\workspace\titanium-testandroidmodule\build.xml
init:
    [mkdir] Created dir: C:\Users\dhairya\workspace\titanium-testandroidmodule\build\classes
    [mkdir] Created dir: C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated
    [mkdir] Created dir: C:\Users\dhairya\workspace\titanium-testandroidmodule\dist
process.annotations:
    [mkdir] Created dir: C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\json
    [javac] Compiling 2 source files to C:\Users\dhairya\workspace\titanium-testandroidmodule\build\classes
    [javac] Note: [KrollBindingGen] Running Kroll binding generator.
    [javac] Note: [KrollBindingGen] No binding data found, creating new data file: org.appcelerator.titanium.bindings/testandroidmodule.json
    [javac] Note: [KrollBindingGen] Found binding for proxy Example
    [javac] Note: [KrollBindingGen] Found binding for module Testandroidmodule
    [javac] Note: [KrollBindingGen] Generating JSON: file:/C:/Users/dhairya/workspace/titanium-testandroidmodule/build/generated/json/org/appcelerator/titanium/bindings/testandroidmodule.json
    [javac] warning: The following options were not recognized by any processor: '[kroll.checkTiContext]'
    [javac] Note: C:\Users\dhairya\workspace\titanium-testandroidmodule\src\com\test\testandroidmodule\ExampleProxy.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
generate.rhino.bindings:
     [java] Generating C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\java\com\test\testandroidmodule\TestandroidmoduleModulePrototype.java
     [java] Generating C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\java\com\test\testandroidmodule\ExampleProxyPrototype.java
     [java] Generating C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\java\testandroidmoduleGeneratedBindings.java
generate.rhino.idswitch:
     [echo] Generating IDs for C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\java\com\test\testandroidmodule\ExampleProxyPrototype.java
     [echo] Generating IDs for C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\java\com\test\testandroidmodule\TestandroidmoduleModulePrototype.java
     [echo] Generating IDs for C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\java\testandroidmoduleGeneratedBindings.java
generate.v8.bindings:
     [java] Generating C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\jni\com.test.testandroidmodule.TestandroidmoduleModule.h
     [java] Generating C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\jni\com.test.testandroidmodule.TestandroidmoduleModule.cpp
     [java] Generating C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\jni\com.test.testandroidmodule.ExampleProxy.h
     [java] Generating C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\jni\com.test.testandroidmodule.ExampleProxy.cpp
generate.bindings:
pre.compile:
ndk.build:
     [copy] Copying 1 file to C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated
     [copy] Copying 1 file to C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\jni
     [exec] jni/Android.mk:24: warning: overriding commands for target `C:/Users/dhairya/workspace/titanium-testandroidmodule/build/generated/KrollGeneratedBindings.cpp'
     [exec] jni/Android.mk:24: warning: ignoring old commands for target `C:/Users/dhairya/workspace/titanium-testandroidmodule/build/generated/KrollGeneratedBindings.cpp'
     [exec] jni/Android.mk:27: warning: overriding commands for target `C:/Users/dhairya/workspace/titanium-testandroidmodule/build/generated/BootstrapJS.cpp'
     [exec] jni/Android.mk:27: warning: ignoring old commands for target `C:/Users/dhairya/workspace/titanium-testandroidmodule/build/generated/BootstrapJS.cpp'
     [exec] /usr/bin/sh: -c: line 1: syntax error: unexpected end of file
     [exec] make: *** [C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated/obj/local/armeabi/objs/com.test.testandroidmodule/com.test.testandroidmodule.ExampleProxy.o] Error 258

BUILD FAILED
C:\Users\dhairya\AppData\Roaming\Titanium\mobilesdk\win32\2.0.1.GA2\module\android\build.xml:236: C:\Users\dhairya\workspace\titanium-testandroidmodule\build\generated\libs does not exist.

Total time: 3 seconds

知道问题是什么?我刚刚使用命令创建了一个默认的android模块:

titanium create --platform=android --type=module --name=testandroidmodule --id=com.test.testandroidmodule --android=C:\Android\android-sdk

在build.property文件中添加了android-ndk路径 这是build.property文件:

titanium.platform=C:\\Users\\dhairya\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\2.0.1.GA2\\android
android.platform=C:\\Android\\android-sdk\\platforms\\android-8
google.apis=C:\\Android\\android-sdk\\add-ons\\addon-google_apis-google_inc_-8
android.ndk=C:\\Android\\android-ndk\\android-ndk-r7b

1 个答案:

答案 0 :(得分:0)

C:\RhoStudio\devkit\bin;下的路径变量中删除System Variables解决了这个问题。 Titanium mobilesdk版本:2.0.1.GA2