Titanium 的常见错误

本文会不断更新中! 

[ERROR] Timed out waiting for emulator to be ready, you may need to close the emulator and try again 
-----关闭Titanium后再启动 

[ERROR] Script Error = Result of expression 'Titanium.Database' [undefined] is not an object. at app.js (line 1). 
-----Clean工程后再启动 

[ERROR] Error generating R.java from manifest 
-----修正Application Id,必须符合FQDN(Fully Qualified Domain Name, 含义是完整的域名),不能有非字符。(Test -> com.example.test)。 
     appid中不能包含appcelerator,titanium等官方相关的词语。 

[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环境变量中 

[ERROR]Code Sign error: The identity ‘iPhone Developer: ‘ doesn’t match any valid certificate/private key pair in the default 
-----provisioning profile做的有问题,iOS Provisioning Portal中作成profile时选择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 
-----启动emulator时加参数'-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.
 
-----通过以下命令在外部启动模拟器后,再在Titanium Studio中启动一次即可。 
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 打开「Window→Preferences→Aptana Studio→Titanium」设置Android SDK。 
关于这个问题Titanium Compatibility Matrix中说的很清楚,如图: 


Distribute Android marketplace为APK签名是出错 
[ERROR] Unable to open 'F:\_workspace_titanium\_test_mobile2\_sign\_test_mobile2.apk' as zip archive 
[ERROR] System Error while compiling Android classes.dex
 
-----确认密码,别名等信息是否跟keystore一致,具体步骤参考通过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 

posted @ 2012-05-16 10:50  zhu_xj  阅读(745)  评论(0编辑  收藏  举报