Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Android emulator won't launch

Running:

Vista Home Basic SP2, 32-bit

Android sdk v7, with all SDK Manager updates installed.

titanium dev 1.2.1

titanium mobile sdk 1.4.0

JDK 1.6.22, with "Path" environment variable set to: C:\Program Files\Java\jdk1.6.0_22\bin

Creating new project then launching android emulator, get trace error:

[INFO] Launching Android emulator…one moment
[DEBUG] From: C:\Temp\android-sdk-windows\tools\emulator.exe
[DEBUG] SDCard: C:\Users\agladdish.titanium\android2.sdcard
[DEBUG] AVD ID: 13
[DEBUG] AVD Skin: HVGA
[DEBUG] SDK: C:\Temp\android-sdk-windows
[DEBUG] C:\Temp\android-sdk-windows\tools\adb.exe start-server
[INFO] Building Hellow World for Android … one moment
[DEBUG] C:\Temp\android-sdk-windows\tools\adb.exe start-server
[TRACE] Traceback (most recent call last):
[TRACE] File "C:\ProgramData\Titanium\mobilesdk\win32\1.4.0\android\builder.py", line 991, in <module>
[TRACE] s.run_emulator(avd_id,avd_skin)
[TRACE] File "C:\ProgramData\Titanium\mobilesdk\win32\1.4.0\android\builder.py", line 246, in run_emulator
[TRACE] devices = self.sdk.list_devices()
[TRACE] File "C:\ProgramData\Titanium\mobilesdk\win32\1.4.0\android\androidsdk.py", line 168, in list_devices
[TRACE] raise Exception(err)
[TRACE] Exception: ADB server didn't ACK
[TRACE] failed to start daemon
[TRACE] error: cannot connect to daemon
[TRACE]
[DEBUG] Waiting for device to be ready …
[TRACE] Traceback (most recent call last):
[TRACE] File "C:\ProgramData\Titanium\mobilesdk\win32\1.4.0\android\builder.py", line 995, in <module>
[TRACE] s.build_and_run(False,avd_id)
[TRACE] File "C:\ProgramData\Titanium\mobilesdk\win32\1.4.0\android\builder.py", line 768, in build_and_run
[TRACE] self.wait_for_device('e')
[TRACE] File "C:\ProgramData\Titanium\mobilesdk\win32\1.4.0\android\builder.py", line 166, in wait_for_device
[TRACE] devices = self.sdk.list_devices()
[TRACE] File "C:\ProgramData\Titanium\mobilesdk\win32\1.4.0\android\androidsdk.py", line 168, in list_devices
[TRACE] raise Exception(err)
[TRACE] Exception: ADB server didn't ACK
[TRACE] failed to start daemon
[TRACE] error: cannot connect to daemon
[TRACE]

Anyone know how to fix this error?

Regards,
agladdish

— asked November 28th 2010 by Anthony Gladdish
1 Comment
  • Resolved: Added Titanium Developer.exe/emulator.exe/adb.exe to my firewall, including emulator's relevant port number. Works a treat now.

    Anthony

    — commented November 30th 2010 by Anthony Gladdish

7 Answers

  • Anthony

    Firstly, you seem to have installed your android sdk into C:\Temp. If this is the system temporary directory, then this probably is not a good idea. C:\android-sdk or C:\programs\android-sdk would be better locations.

    Can you run the android tool to see whether a virtual device has been created by Titanium? It should have a name beginning with "titanium_".

    See this screenshot:

    screenshot

    If one exists, select it and click on the start button to see if it boots successfully.

    Try rebooting after you have installed, just to ensure there isn't any windows funny business going on. ;)

    Report back and either I, or someone else, will help you further.

    — answered November 28th 2010 by Paul Dowsett
    permalink
    0 Comments
  • Re-installed Android SDK to C:\android-sdk and rebooted.
    Re-installed Titanium.

    Running Titanium does not create any AVDs; my AVD list is empty. Emulator runs from a manually created AVD though, it's details are:

    name: titanium_HVGA
    Android 2.2 API 8, with a 50MB SD Card.

    Titanium Trace is now:

    [INFO] Launching Android emulator…one moment
    [DEBUG] From: C:\android-sdk-windows\tools\emulator.exe
    [DEBUG] SDCard: C:\Users\agladdish.titanium\android2.sdcard
    [DEBUG] AVD ID: 12
    [DEBUG] AVD Skin: HVGA
    [DEBUG] SDK: C:\android-sdk-windows
    [DEBUG] C:\android-sdk-windows\tools\adb.exe start-server
    [INFO] Building Hello World for Android … one moment
    [DEBUG] C:\android-sdk-windows\tools\adb.exe start-server

    So there are now no errors listed, however, app is not launched in emulator, even after waiting for 11 minutes.

    Thanks,
    Anthony

    — answered November 28th 2010 by Anthony Gladdish
    permalink
    0 Comments
  • Anthony

    I think the problem is that Titanium is looking for your android SDK in C:\android-sdk-windows whereas I think from what you say it's in C:\android-sdk

    You can configure this in the Edit Profile menu, as shown here:
    screenshot

    I hope this gets you up and running :)

    — answered November 28th 2010 by Paul Dowsett
    permalink
    1 Comment
    • Apologies, cut and paste error.
      Have since renamed to "C:\android-sdk" and profile settings are correct.
      Emulator runs if started manually, but launching from Titanium, trace is:

      [INFO] Launching Android emulator…one moment
      [DEBUG] From: C:\android-sdk\tools\emulator.exe
      [DEBUG] SDCard: C:\Users\agladdish.titanium\android2.sdcard
      [DEBUG] AVD ID: 12
      [DEBUG] AVD Skin: HVGA
      [DEBUG] SDK: C:\android-sdk
      [DEBUG] C:\android-sdk\tools\adb.exe start-server
      [INFO] Building Hello World for Android … one moment
      [DEBUG] C:\android-sdk\tools\adb.exe start-server
      [TRACE] Traceback (most recent call last):
      [TRACE] File "C:\ProgramData\Titanium\mobilesdk\win32\1.4.0\android\builder.py", line 991, in <module>
      [TRACE] s.run_emulator(avd_id,avd_skin)
      [TRACE] File "C:\ProgramData\Titanium\mobilesdk\win32\1.4.0\android\builder.py", line 246, in run_emulator
      [TRACE] devices = self.sdk.list_devices()
      [TRACE] File "C:\ProgramData\Titanium\mobilesdk\win32\1.4.0\android\androidsdk.py", line 168, in list_devices
      [TRACE] raise Exception(err)
      [TRACE] Exception: ADB server didn't ACK
      [TRACE] failed to start daemon
      [TRACE] error: cannot connect to daemon
      [TRACE]
      [DEBUG] Waiting for device to be ready …

      As Titanium is not automatically creating any AVDs, am wondering what the AVD's settings should be as mine are set up manually?

      My AVD is currently:

      name: "titanium_HVGA" Android 2.2 API 8, with a 50MB SD Card.

      Thanks,
      Anthony

      — commented November 29th 2010 by Anthony Gladdish
  • duplicate of
    http://developer.appcelerator.com/question/86751/android-emulater-wont-launch-adbexe-doesnt-start
    and
    http://developer.appcelerator.com/question/88681/titanium-developer-cannot-find-adbexe-or-androidbat-in-the-sdks-tool-directory

    i have the same problem on windows 7 with android sdk 1.6 & 2.2

    adb.exe is NOT in /tools/ but in /platform-tools/

    apparently manually copying ade.exe into both places is a workaround

    but it would be nice if appcelerator fixed titanium so you dont have to apply this patch manually

    — answered December 23rd 2010 by clive darra
    permalink
    0 Comments
  • I am also experiencing this issue at the moment, with the same errors.
    This morning it was all working fine and then I updated my Android SDK to the latest version (I installed the SDK about a year ago and haven't updated it). Now that I have upgraded I can't test my application on either my phone or the emulator.
    I have re-installed Titanium, deleted my AVD's and tried a computer restart. Not had any luck thus far.

    — answered March 3rd 2013 by Frog Man
    permalink
    0 Comments
  • Im also facing the same issue.can anyone help please..
    [ERROR]Exception: ADB server didn't ACK
    [ERROR] failed to start daemon
    [ERROR] error: cannot connect to daemon
    [ERROR]

    — answered April 4th 2013 by Aparna M
    permalink
    0 Comments
  • start task manager and search for adb.exe end the process of adb.exe…restart the emulator

    — answered April 4th 2013 by Aparna M
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.