Titanium的常见错误及应对办法

移动开发
本文将介绍在Titanium开发中的常见错误及应对办法。希望对各位正在使用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

责任编辑:佚名 来源: rensanning的博客
相关推荐

2009-12-29 15:34:08

ADO错误提示

2022-01-23 14:29:25

C语言编程语言

2020-10-19 09:34:04

C语言内存错误编程语言

2019-10-10 15:57:09

云安全混合云架构

2023-11-27 16:39:09

数字化转型

2022-04-20 12:06:10

漏洞Java应用程序黑客

2022-04-15 11:37:19

密码网络攻击网络安全

2012-10-11 15:28:18

设置默认打印机

2010-01-27 12:06:00

UPS常见故障

2012-05-30 16:19:11

2013-08-15 09:47:07

云迁移云技术

2015-08-19 14:11:56

SQL Server错误处理

2024-10-07 08:26:05

编程Python异常处理

2023-03-24 20:21:34

项目管理

2012-05-18 11:29:55

Titaniumpros

2012-05-18 11:34:03

Titaniumcons

2009-12-09 09:28:14

PLINQ

2012-02-13 14:41:50

Titanium架构分析

2010-09-07 09:50:35

DIVCSS

2024-07-16 08:00:00

Kubernetes开发
点赞
收藏

51CTO技术栈公众号