2016-08-17 57 views
1

我在Windows 10上的鈦合金問題不會停止。我創建了一個新模塊,其中ti create並選擇Moduleandroid。我在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 NDKv12.1.2977051),AntV1。 9.7),GperfV3.0.1Python32位V3.5.2Python Setup Toolsv25.2.0)和所有需要的在the Appcelerator Docu上列出的軟件包。

雖然安裝這些組件,我遇到了兩個其他幾個問題:

  1. 失敗的各種原因的附加軟件包的安裝。我不得不從here安裝Visual C++ Build Tools
  2. 無法找到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。但是現在我收到了開頭提到的錯誤。我試過Eclipse32位command line

謝謝你的幫助!

TLDNR:我的Ant構建我的鈦合金的Android模塊

回答

0

失敗,除了問題Windows 10,它看起來像使用Titanium SDK已在\ProgramData\Titanium\mobilesdk\win32\<SDK Version>\android\titanium.jar一些丟失的文件。文件Log.classTiConfig.class就是其中的一部分。

要「更新」titanium.jar,我使用了一個較舊的SDK並提取了它的titanium.jar。然後,可以通過Command Line添加丟失的文件(有關詳細信息,請參見here)。

儘管如此,新的錯誤出現......我認爲這迫使我切換到MAC。