我在Windows 10上的鈦合金問題不會停止。我創建了一個新模塊,其中ti create
並選擇Module
和android
。我在build.properties
文件中添加了Android NDK
的路徑。當試圖編譯模塊Ant
,我得到以下錯誤日誌:鈦原生Android模塊的Ant編譯失敗
Buildfile: C:\Users\ekoppenhagen\workspace_titanium\Ti.NearbyMessages\android\build.xml
python.set.exec:
python.check:
[echo] Testing for Python
[exec] Python 3.5.2
init:
process.aidl:
[echo] Generating java files from the .aidl files
[echo] C:\android-sdk\build-tools\23.0.3\aidl.exe
process.annotations:
[mkdir] Created dir: C:\Users\ekoppenhagen\workspace_titanium\Ti.NearbyMessages\android\build\generated\json
[javac] Compiling 2 source files to C:\Users\ekoppenhagen\workspace_titanium\Ti.NearbyMessages\android\build\classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] Note: [KrollBindingGen] Running Kroll binding generator.
[javac] Note: [KrollBindingGen] No binding data found, creating new data file: org.appcelerator.titanium.bindings/Ti.NearbyMessages.json
[javac] Note: [KrollBindingGen] Found binding for proxy Example
[javac] Note: [KrollBindingGen] Found binding for module TiNearbyMessages
[javac] C:\Users\ekoppenhagen\workspace_titanium\Ti.NearbyMessages\android\src\de\vater\solution\ti\nearbymessages\ExampleProxy.java:15: error: cannot find symbol
[javac] import org.appcelerator.titanium.util.Log;
[javac] ^
[javac] symbol: class Log
[javac] location: package org.appcelerator.titanium.util
[javac] C:\Users\ekoppenhagen\workspace_titanium\Ti.NearbyMessages\android\src\de\vater\solution\ti\nearbymessages\ExampleProxy.java:16: error: cannot find symbol
[javac] import org.appcelerator.titanium.util.TiConfig;
[javac] ^
[javac] symbol: class TiConfig
[javac] location: package org.appcelerator.titanium.util
[javac] Note: [KrollBindingGen] Generating JSON: file:/C:/Users/ekoppenhagen/workspace_titanium/Ti.NearbyMessages/android/build/generated/json/org/appcelerator/titanium/bindings/Ti.NearbyMessages.json
[javac] warning: The following options were not recognized by any processor: '[kroll.checkTiContext]'
[javac] 2 errors
BUILD FAILED
C:\ProgramData\Titanium\mobilesdk\win32\6.1.0.v20160816022751\module\android\build.xml:185: Compile failed; see the compiler error output for details.
Total time: 1 second
此外,對於正常的設置(見my other problem),我已經安裝了Android NDK
(v12.1.2977051),Ant
(V1。 9.7),Gperf
(V3.0.1)Python
32位(V3.5.2)Python Setup Tools
(v25.2.0)和所有需要的在the Appcelerator Docu上列出的軟件包。
雖然安裝這些組件,我遇到了兩個其他幾個問題:
- 失敗的各種原因的附加軟件包的安裝。我不得不從here安裝
Visual C++ Build Tools
。 - 無法找到
Ti SDK
文件夾中的某些文件。我不得不將C:\ProgramData\Titanium\mobilesdk\win32\<SDK version>\module\android\win32
的內容複製到其父文件夾。
我修改的環境變量如下:
路徑:
C:\Program Files (x86)\apache-ant-1.9.7\bin;C:\Program Files (x86)\GnuWin32\bin;C:\Python35-32;C:\Python35-32\Scripts
ANDROID_NDK:
C:\android-sdk\ndk-bundle
(I還測試它Python
V2.X 32位用相同的結果)。
我第一次嘗試編譯位於我的項目的android
文件夾中的build.xml
失敗,出現以下消息:
BUILD FAILED
C:\ProgramData\Titanium\mobilesdk\win32\<SDK version>\module\android\build.xml:165: no executable specified
幸運的是,丹Kronholm提供的解決方案here。但是現在我收到了開頭提到的錯誤。我試過Eclipse
32位和command line
。
謝謝你的幫助!
TLDNR:我的Ant構建我的鈦合金的Android模塊