无法构建Titanium Android应用程序以在模拟器中进行测试

时间:2012-06-30 20:29:10

标签: android titanium

我正在使用Ubuntu 12.04(x64)和java 6(正如钛需要的那样),并且标题说我无法构建Android应用程序来在模拟器上测试它。我一直收到这个错误

[ERROR] Application Installer abnormal process termination. Process exit value was 1
[ERROR] Exception occured while building Android project:
[ERROR] Traceback (most recent call last):
[ERROR]   File "/home/irmantas/.titanium/mobilesdk/linux/2.1.0.GA/android/builder.py", line 2206, in <module>
[ERROR]     s.build_and_run(False, avd_id, debugger_host=debugger_host)
[ERROR]   File "/home/irmantas/.titanium/mobilesdk/linux/2.1.0.GA/android/builder.py", line 2037, in build_and_run
[ERROR]     launched, launch_failed = self.package_and_deploy()
[ERROR]   File "/home/irmantas/.titanium/mobilesdk/linux/2.1.0.GA/android/builder.py", line 1569, in package_and_deploy
[ERROR]     self.keystore_alias])
[ERROR]   File "/home/irmantas/.titanium/mobilesdk/linux/2.1.0.GA/android/run.py", line 36, in run
[ERROR]     process = subprocess.Popen(args, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
[ERROR]   File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
[ERROR]     errread, errwrite)
[ERROR]   File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
[ERROR]     raise child_exception
[ERROR] OSError: [Errno 2] No such file or directory

2 个答案:

答案 0 :(得分:2)

对我来说,结果证明是一个java问题。 “没有这样的文件或目录”原来是jarsigner。为了解决这个问题,借鉴这些信息https://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7我输入了以下内容

sudo update-alternatives --quiet --install /usr/bin/jarsigner jarsigner /usr/lib/jvm/jdk1.6.0_32/bin/jarsigner 100 --slave /usr/share/man/man1/jarsigner.1 jarsigner.1 /usr/lib/jvm/jdk1.6.0_32/man/man1/jarsigner.1

这立即解决了问题

答案 1 :(得分:0)

三种可能的解决方案:

http://developer.appcelerator.com/question/86751/android-emulater-wont-launch-adbexe-doesnt-start http://developer.appcelerator.com/question/121286/error-running-projects-in-android-emulator ... appcelerator.com/question/120519/emulator-is-crashing-unexpectedly

  1. 检查工具和平台工具文件夹中是否可以访问adb
  2. 检查app.js
  3. 中是否存在有趣的编码
  4. 使用android工具重新保存或删除Titanium AVD
  5. 对于

    java -version

    你应该得到

    java版“1.6.0_33” Java(TM)SE运行时环境(版本1.6.0_33-b03) Java HotSpot(TM)客户端VM(版本20.8-b03,混合模式,共享)