【问题标题】:Titanium 3.1.0 - Emulator process exited with code 1 - Can't compile APKTitanium 3.1.0 - 模拟器进程以代码 1 退出 - 无法编译 APK
【发布时间】:2013-06-08 14:46:18
【问题描述】:

Titanium Studio 有这个问题。我无法为 Android 编译我的项目。我尝试运行或调试到项目,但我收到此消息:

Titanium Command-Line Interface, CLI version 3.1.0, Titanium SDK version 3.1.0.GA
Copyright (c) 2012-2013, Appcelerator, Inc.  All Rights Reserved.
[INFO] :   Running emulator process: python "C:\Users\Dev\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py" "emulator" "MyApp" "E:\Developpement\Mobile\SDKs\Android" "E:\Developpement\Mobile\Appcelerator\MyApp" "com.developper.myapp" "2" "WVGA854" "armeabi"

[INFO] :   Running build process:  python "C:\Users\Dev\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py" "simulator" "MyApp" "E:\Developpement\Mobile\SDKs\Android" "E:\Developpement\Mobile\Appcelerator\MyApp" "com.developper.myapp" "2" "WVGA854" "/127.0.0.1:49314"

[INFO] logfile = E:\Developpement\Mobile\Appcelerator\MyApp\build.log

[INFO] Building MyApp for Android ... one moment

[INFO] Titanium SDK version: 3.1.0 (04/15/13 18:45 57634ef)

[ERROR] :  Emulator process exited with code 1

[INFO] :   Project built successfully in 5s 421ms

[INFO] :   Emulator not running, exiting...

模拟器没有启动,并且 bin 文件夹中没有构建 APK 文件。 我安装了 Android 2.2 和 4.2.2 SDK。我尝试了一切(清理项目,甚至卸载并重新安装 Titanium Studio)。

我使用 Titanium 2.1.4 完成了这个项目。现在我使用的是 3.1.0,我收到了这个错误信息。 在 tiapp.xml 中,如果我选择使用 Titanium 2.1.4 SDK 运行项目,我会收到以下消息:

[INFO] logfile = E:\Developpement\Mobile\Appcelerator\MyApp\build.log

[INFO] Launching Android emulator...one moment

[INFO] Creating new Android Virtual Device (2 WVGA854)

[ERROR] Exception occured while building Android project:

[ERROR] Traceback (most recent call last):

[ERROR]   File "C:\Users\Dev\AppData\Roaming\Titanium\mobilesdk\win32\2.1.4.GA\android\builder.py", line 2282, in <module>

[ERROR]     s.run_emulator(avd_id, avd_skin, avd_name, avd_abi, add_args)

[ERROR]   File "C:\Users\Dev\AppData\Roaming\Titanium\mobilesdk\win32\2.1.4.GA\android\builder.py", line 523, in run_emulator

[ERROR]     avd_name = self.create_avd(avd_id, avd_skin, avd_abi)

[ERROR]   File "C:\Users\Dev\AppData\Roaming\Titanium\mobilesdk\win32\2.1.4.GA\android\builder.py", line 485, in create_avd

[ERROR]     inifilec = open(inifile,'r').read()

[ERROR] IOError: [Errno 2] No such file or directory: 'C:\\Users\\Dev\\.android\\avd\\titanium_2_WVGA854.avd\\config.ini'

然后:

[INFO] logfile = E:\Developpement\Mobile\Appcelerator\MyApp\build.log

[INFO] Building MyAppfor Android ... one moment

[INFO] Titanium SDK version: 2.1.4 (11/09/12 12:46 51f2c64)

[ERROR] Application Installer abnormal process termination. Process exit value was 1

[ERROR] Timed out waiting for emulator to be ready, you may need to close the emulator and try again

没有模拟器在运行,也没有构建 APK。 如果有人有想法...

我使用的是 Win7 64 位。也许我在配置过程中遗漏了一些东西。

感谢您的帮助。

【问题讨论】:

  • 您的系统中是否安装了 32 位 java?

标签: android sdk titanium emulation apk


【解决方案1】:

当我尝试在 Android 上运行一个项目时,我遇到了类似的问题:

[ERROR] :  Emulator process exited with code 1
[ERROR] :  Build process exited with code 1
[ERROR] :  Project failed to build after 234ms
[ERROR] Application Installer abnormal process termination. Process exit value was 1

我尝试使用不同的以前的 android sdks 2.3.3、2.1、2.2 进行编译,因为该应用程序假定与它们兼容,但没有运气。

解决方案是在 Tiapp.xml 上的 Android 标记中删除/更改此标记/行

<tool-api-level>15</tool-api-level>

它指向 Api 15 (Android sdk 4.0.3),我没有安装。我个人已经删除了那行。

该解决方案也适用于 Kitchen Sink,您必须删除/更改上述相同的标记/行。现在我已经为我使用的 Api 10 (Android sdk 2.3.3) 构建了它。

【讨论】:

    【解决方案2】:

    如果 Kitchen Sink 演示发生这种情况,解决方法是进入 Android SDK 管理器并安装“Android 3.0 (API 11)”。确保应用使用模拟器“Google APIs (Android 2.3.3)”和“WVGA854”。我假设存在 Titanium 错误,因为您必须安装比实际使用的 API 级别(3.0)更高的 API(2.3.3)。完全使用这些设置,Kitchen Sink 可以按预期工作。

    【讨论】:

      【解决方案3】:

      答案 1:

      似乎构建工具已通过最新的 Android SDK 更新移至另一个目录。在 /Applications/Android-sdk/platform-tools 中创建了指向 aapt 和 dx 的符号链接:

      ln -s /Applications/Android-sdk/build-tools/17.0.0/aapt aapt ln -s /Applications/Android-sdk/build-tools/17.0.0/dx dx
      

      这为我解决了这个问题(在深入研究了他们的 Python 代码之后)。

      答案 2:

      我在 Windows 上,所以我使用了 mklink。我必须添加一个指向 lib/dx.jar 的链接才能正常工作。我首先将文件夹'lib'添加到平台工具文件夹,然后在命令行中:

      cd %YOUR_ANDROID_DIR%\platform-tools    
      mklink aapt.exe ..\build-tools\android-4.2.2\aapt.exe
      mklink dx.bat ..\build-tools\android-4.2.2\dx.bat      
      cd lib                              
      mklink dx.bat ..\..\build-tools\android-4.2.2\lib\dx.jar
      

      答案 3:

      我复制了以下文件:

      C:\Android\build-tools\17.0.0\aapt.exe to C:\Android\platform-tools\aapt.exe
      C:\Android\build-tools\17.0.0\dx.bat  to  C:\Android\platform-tools\dx.bat
      C:\Android\build-tools\17.0.0\lib  to  C:\Android\platform-tools\lib
      

      然后我清理了项目并重新构建,现在一切正常。

      来源:http://developer.appcelerator.com/question/152497/titanium-sdk-310-error-typeerror-argument-of-type-nonetype-is-not-iterable-on-building-android-app#comment-175782

      【讨论】:

        【解决方案4】:

        你读过System Requirements吗?

        来自文档:

        对于 Windows,需要 32 位版本的 Java JDK,无论 Titanium 是在 32 位还是 64 位系统上运行。

        尝试安装额外的 32 位版本的 Java(不删除 64 位)并设置系统变量。 或许这会对你有所帮助。

        【讨论】:

          猜你喜欢
          • 2018-05-17
          • 2018-05-24
          • 1970-01-01
          • 1970-01-01
          • 2018-07-22
          • 2021-10-14
          • 1970-01-01
          • 2020-10-24
          • 2019-05-29
          相关资源
          最近更新 更多