Titanium的常見(jiàn)錯(cuò)誤及應(yīng)對(duì)辦法
[ERROR] Timed out waiting for emulator to be ready, you may need to close the emulator and try again
-----關(guān)閉Titanium后再啟動(dòng)
[ERROR] Script Error = Result of expression 'Titanium.Database' [undefined] is not an object. at app.js (line 1).
-----Clean工程后再啟動(dòng)
[ERROR] Error generating R.java from manifest
-----修正Application Id,必須符合FQDN(Fully Qualified Domain Name, 含義是完整的域名),不能有非字符。(Test -> com.example.test)。
appid中不能包含appcelerator,titanium等官方相關(guān)的詞語(yǔ)。
[ERROR] Exception occured while building Android project:
[ERROR] Traceback (most recent call last):
・・・・・・・・・・
[ERROR] UnicodeDecodeError: 'utf8' codec can't decode byte 0x82 in position 142: unexpected code type
-----把文件的編碼改為"UTF-8"
[ERROR] Failed installing com.appcelerator.kitchensink: pkg: /data/local/tmp/app.apk
[TRACE] Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
-----更新SDK版本(建議2.2以上),選擇Google APIs
[ERROR] ....../strings.xml:3: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
-----把String.xml中的“%d + %d = %d”改為“%1$d + %2$d = %3$d”
[ERROR] JDK version 'javac' is not recognized as an internal or external command
-----把%JAVA_HOME%\bin放入path環(huán)境變量中
[ERROR]Code Sign error: The identity ‘iPhone Developer: ‘ doesn’t match any valid certificate/private key pair in the default
-----provisioning profile做的有問(wèn)題,iOS Provisioning Portal中作成profile時(shí)選擇Development而不是Distribution
[ERROR] Analytics error sending request: The request timed out
[ERROR] Will re-queue analytics
-----刪除build/iphone再試
[TRACE] E/TiHttpClient( 1151): java.net.UnknownHostException: Host is unresolved: xxxxxxx
-----啟動(dòng)emulator時(shí)加參數(shù)'-dns-server 8.8.8.8'
[DEBUG] D:\android-sdk-windows\tools\emulator.exe -avd titanium_5_HVGA -port 5560 -sdcard "C:\Documents and Settings\RenSanNing\.titanium\titanium_5_HVGA.sdcard" -logcat *:d,* -no-boot-anim -partition-size 128
invalid command-line parameter: C:\Documents.
Hint: use '@foo' to launch a virtual device named 'foo'.
please use -help for more information
[DEBUG] signal caught: 3
[DEBUG] calling emulator kill on 13360
ERROR: The process "13360" not found.
-----通過(guò)以下命令在外部啟動(dòng)模擬器后,再在Titanium Studio中啟動(dòng)一次即可。
emulator.exe -avd titanium_5_HVGA -port 5560
"Could not locate the Android SDK at a given path" in Preferences
-----下載Android 2.1 API 7 或 Google APIs Android API 7 打開(kāi)「Window→Preferences→Aptana Studio→Titanium」設(shè)置Android SDK。
關(guān)于這個(gè)問(wèn)題Titanium Compatibility Matrix中說(shuō)的很清楚,如圖:
Distribute Android marketplace為APK簽名是出錯(cuò)
[ERROR] Unable to open 'F:\_workspace_titanium\_test_mobile2\_sign\_test_mobile2.apk' as zip archive
[ERROR] System Error while compiling Android classes.dex
-----確認(rèn)密碼,別名等信息是否跟keystore一致,具體步驟參考通過(guò)Titanium Studio為Android APK簽名
[ERROR] JDK version 1.7.0_02 detected, but 1.6 is required
-----安裝JDK1.6版本,具體可以查看源碼C:\Documents and Settings\$user_name$\Application Data\Titanium\mobilesdk\win32\1.8.2\android\prereq.py