Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17341] Android: Unable to deploy and run app on Windows 7

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2016-09-28T23:34:01.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsCLI
Labelsn/a
ReporterEduardo Gomez
AssigneeChris Barber
Created2014-07-16T20:46:46.000+0000
Updated2017-03-27T20:42:11.000+0000

Description

Issue description

On Windows Titanium is unable to build, deploy and run app on Android Emulator (either 3.2.3.GA or 3.2.0.GA SDKs).

Steps to reproduce

Create a HelloWorld app (through the File Menu->New->Mobile App Project->Two-tabbed Alloy Application)

Below is the output after trying to debug the application on Android emulator.

Output

[ERROR] Application Installer abnormal process termination. Process exit value was 1 
C:\Users\chong1\AppData\Roaming\npm\node_modules\titanium\node_modules\longjohn\dist\longjohn.js:185 
throw e; 
^ 
Error: oob 
at Buffer.slice (buffer.js:558:32) 
at Connection.exec (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:185:26) 
at EventEmitter.emit (events.js:96:17) 
at TCP.onread (net.js:397:14) 
--------------------------------------------- 
at Connection.exec (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:114:9) 
at ADB.devices (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:362:23) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\emulator.js:187:9 
at async.whilst (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:619:13) 
at async.whilst (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:623:23) 
at list.ontimeout (timers.js:101:19) 
--------------------------------------------- 
at async.whilst.adb.shell.done (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\emulator.js:189:7) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:353:3 
at _asyncMap (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:232:13) 
at async.eachSeries.iterate (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:142:25) 
at _asyncMap (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:229:17) 
at async.series.results (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:556:34) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:297:30 
at async.series.results (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:551:21) 
--------------------------------------------- 
at Connection.exec (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:114:9) 
at ADB.devices (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:362:23) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\emulator.js:187:9 
at async.whilst (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:619:13) 
at async.whilst (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:623:23) 
at list.ontimeout (timers.js:101:19) 
--------------------------------------------- 
at async.whilst.adb.shell.done (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\emulator.js:189:7) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:353:3 
at _asyncMap (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:232:13) 
at async.eachSeries.iterate (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:142:25) 
at _asyncMap (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:229:17) 
at async.series.results (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:556:34) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:297:30 
at async.series.results (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:551:21) 
--------------------------------------------- 
at Connection.exec (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:114:9) 
at ADB.devices (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:362:23) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\emulator.js:187:9 
at async.whilst (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:619:13) 
at async.whilst (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:623:23) 
at list.ontimeout (timers.js:101:19) 
--------------------------------------------- 
at async.whilst.adb.shell.done (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\emulator.js:189:7) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:353:3 
at _asyncMap (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:232:13) 
at async.eachSeries.iterate (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:142:25) 
at _asyncMap (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:229:17) 
at async.series.results (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:556:34) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:297:30 
at async.series.results (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:551:21) 
--------------------------------------------- 
at Connection.exec (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:114:9) 
at ADB.devices (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:362:23) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\emulator.js:187:9 
at async.whilst (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:619:13) 
at async.whilst (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:623:23) 
at list.ontimeout (timers.js:101:19) 
--------------------------------------------- 
at async.whilst.adb.shell.done (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\emulator.js:189:7) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:353:3 
at _asyncMap (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:232:13) 
at async.eachSeries.iterate (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:142:25) 
at _asyncMap (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:229:17) 
at async.series.results (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:556:34) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:297:30 
at async.series.results (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:551:21) 
--------------------------------------------- 
at Connection.exec (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:114:9) 
at ADB.devices (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\adb.js:362:23) 
at C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\titanium-sdk\lib\emulator.js:187:9 
at async.whilst (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:619:13) 
at async.whilst (C:\Users\chong1\AppData\Roaming\Titanium\mobilesdk\win32\3.2.3.GA\node_modules\async\lib\async.js:623:23) 
at list.ontimeout (timers.js:101:19)

$ java -version

java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)

CLI

Building from CLI throws:
[ERROR] : Emulator exited with error: 1 [ERROR] : PANIC: Could not open: ANDROID_VIRTUAL_DEVICE_ID [ERROR] Application Installer abnormal process termination. Process exit value was 1

Attachments

FileDateSize
Appc_Ti_info.txt2014-07-16T20:46:46.000+00006216
Appc_TiConfig.txt2014-07-16T20:46:46.000+00001205
AppceleratorStudio_ConsoleLogs.txt2014-07-16T20:46:46.000+000043629
AppceleratorStudio_DiagnosticTest.txt2014-07-16T20:46:46.000+000017354
AppceleratorStudio_ViewLogFile.txt2014-07-16T20:46:46.000+0000144181

Comments

  1. Chris Barber 2014-07-16

    adb probably just got in a wonky state. I would try adb kill-server and adb start-server. I have slightly improved the Android emulator experience in 3.3.0. If you could, you can install Titanium CLI 3.3.0-rc4 with the latest 3.3.X CI build and give it a go. Otherwise, re-test this once 3.3.0 ships and see if the problem has been resolved.
  2. Eduardo Gomez 2014-07-17

  3. Chris Barber 2014-07-17

    [~egomez] Then you must have something wrong with your Android install. "ti info" should return after a few seconds. What version of the Android SDK Tools, Platform Tools, and Build Tools are you using? FYI, on my Mac, I've got 23.0.2, 20, and 20 respectively. Is it possible to kill adb, rename the Android SDK folder, then re-install the Android SDK?
  4. Eduardo Gomez 2014-07-17

    Hi Chris, My Android configuration is identical yours. To recap: Android SDK tools 23.0.2, Platform Tools 20 and Build-Tools 20. Errors persist while building on Windows. Env: CLI 3.3.0 / 3.3.0.GA / Appcelerator Studio 3.3.0 Logs (Studio & CLI): https://gist.github.com/egomez99/9c23d6a922deecd34739 Should I still have a try at the work around TIMOB-17221 to bypass the zip align error? (occurring on CLI only).
  5. Chris Barber 2014-07-17

    [~egomez] Based on the output, the Titanium CLI cannot see the zipalign tool. If you run ti setup check, it should say where it thinks zipalign is. It should be in /path/to/android-sdk/build-tools/20.0.0/zipalign. What type of Android emulator are you trying to launch? ARM? x86? Genymotion?
  6. Eduardo Gomez 2014-07-17

    Both ARM & x86. Ironically, Android SDK tools aren't supported on Windows PC:
       Android Environment
         V  sdk                installed (C:\android-sdk)
         ×  tools              unsupported version 23.0.2
         ×  platform tools     unsupported version 20.0.0
         ×  build tools        unsupported version 20.0.0
         V  adb                installed C:\android-sdk\platform-tools\adb.exe
         V  android            installed C:\android-sdk\tools\android.bat
         V  emulator           installed C:\android-sdk\tools\emulator.exe
         V  mksdcard           installed C:\android-sdk\tools\mksdcard.exe
         ×  zipalign           "zipalign" executable not found; please reinstall Android SDK
       
    I've already re-installed Android SDK twice. Do you want me to get it once again or if there is any more info that I could provide, I'd be more than happy to try.
  7. Chris Barber 2014-07-17

    [~egomez] You need to select Titanium SDK 3.3.0.GA:
       ti sdk select 3.3.0.GA
       
  8. Eduardo Gomez 2014-07-17

    From the logs I thought it was already enabled. After entering command above the error persists.
  9. Chris Barber 2014-07-17

    [~egomez] After selecting 3.3.0.GA, does ti setup check say that the Android tools are now supported?
  10. Eduardo Gomez 2014-07-17

    Nope, It doesn't. Same result.
  11. Chris Barber 2014-07-17

    [~egomez] I strongly believe this is a dupe of TIMOB-17344 which I have a fix in for. You should follow the workaround in that ticket. Please try fixing your Genymotion emulators and report back. If the fix indeed does resolved the issue, then I will resolve this ticket as a dupe.
  12. Eduardo Gomez 2014-07-17

    Okay, since x86 & ARM emulators does not seem to be properly detected I can install Genymotion. I will use the work around proposed, if necessary.
  13. Chris Barber 2014-07-18

    If you don't have Genymotion installed, then installing it won't solve your problem. You can try manually applying the changes from https://github.com/appcelerator/titanium_mobile/pull/5913/files and see if it helps.
  14. Chris Barber 2016-09-28

    I can't reproduce this issue. The logic in adb.js has been improved in the past 2 years, so it has either been fixed or it was an issue with an old version of the Android tools.

JSON Source