Titanium Community Questions & Answer Archive

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

Timed out waiting for emulator to be ready

Is there a way to increase the timeout with Appcelerator waiting for the Android emulator to start up? Mine takes slightly longer than it should (call it Antivirus or something-or-other) and it only launches successfully every 3/4 times that I try to start it.

— asked July 12th 2010 by Gregor Munro
  • adb
  • android
  • emulator
  • timeout
2 Comments
  • I increased the timeout by modifying C:\Documents and Settings\All Users\Application Data\Titanium\mobilesdk\win32\1.4.0\android\builder.py

    def wait_for_device ...
    ...
            max_wait = 120
            max_zero = 30
    

    but that still did not fix my problem.
    My emulator would never start, but I read a post that said to copy ANDROID_SDK\platform-tools\adb.exe into my ANDROID_SDK\tools folder. That allowed my emulator to start but titanium could not find the device.

    I copied ANDROID_SDK\platform-tools\AdbWinApi.dll and AdbWinUsbApi.dll into ANDROID_SDK\tools and FINALLY was able to view my helloworld app

    — commented December 10th 2010 by Jermel Washington
  • I'm on a mac, so I went to the terminal and put this in:

    titanium config android.emulatorStartTimeout 0

    That will make it wait forever, but the emulator never properly started, so the problem is elsewhere (for me anyway).

    — commented April 21st 2014 by Travis Heeter

15 Answers

  • Hi David,

    The only thing I've found to work is to run up a cmd or shell prompt and run:

    ./adb kill-server && ./adb start-server && ./adb devices
    

    when I experience a problem. It tends to only occur when I have too many programs running at once ( ie am short on Memory, disk, CPU or timeslice etc )

    Greg

    — answered September 14th 2010 by Gregor Munro
    permalink
    5 Comments
    • Thank you, thank you, thank you.

      — commented December 17th 2010 by Mike Dosey
    • yes, sure it was three years ago, but this worked for me! I've spent, well, more hours than I am willing to admit trying to get an app to run or debug in an android emulator with no success at all (until I got the tip about GenyMotion - but that wont' run directly from the Studio.)
      I had this idea that perhaps the Titanium 3.2 would fix my emulator woes, but no luck. Gregor's tip however resulted in success and made my day. Thanks!

      — commented January 10th 2014 by Tony Adams
    • This worked for me too after struggling with the emulator for a long while.

      — commented February 16th 2014 by Kent Gividen
    • Worked for me too on Mac.. thanks

      — commented February 24th 2014 by Amit Doshi
    • And for me in mac also, thank you.

      — commented July 21st 2014 by Manuel Conde Vendrell
  • Found the problem, the android tool creates the AVD in the E:\.android when it should be in C:\Documents and Settings\{user}\.android

    Hope it helps

    — answered August 25th 2010 by Diego Potapczuk
    permalink
    6 Comments
    • Found a fix, create a global environment variable called ANDROID_SDK_HOME and set it to C:\Documents and Settings\{user}

      Ir Worked for me, you can check in the android AVD tool where it show in which directory it is looking for AVDs.

      — commented August 25th 2010 by Diego Potapczuk
    • For Windows 7 users this path will be C:\Users{user}

      This seems to have cleared up one of the errors for me, but I still am getting the time out.

      — commented November 11th 2010 by Jesse Bilsten
    • Oops, C:\Users{user}

      — commented November 11th 2010 by Jesse Bilsten
    • Can't edit or delete old comments, so excuse the spam. Here's a code wrapped fix.

      C:\Users\{user}
      

      — commented November 11th 2010 by Jesse Bilsten
    • Thanks! That worked!

      — commented November 30th 2010 by David Simmeth
    • Deleting all AVD's worked for me..

      Mac 10.7.4 & Titanium SDK version: 3.0.2

      — commented April 28th 2013 by Sadi G
  • I can't get the android emulator to show at all. Not even with a empty testapp. Tried various android versions and screens.

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

    Can't be my machine is too slow… it's a 64bits system running clean Windows 7 install with 6Gb ram and dual core P8700…

    Any suggestions?

    — answered July 26th 2010 by Albert Skibinski
    permalink
    3 Comments
    • Same problem here, tried to kill the process, tried to change emulator settings, but none worked, the emulator just not show off.

      — commented August 25th 2010 by Diego Potapczuk
    • I am still having the same problem. It is very frustrating.

      — commented September 8th 2010 by Francisco Tirado
    • I also am getting this. Windows 7 64bit, can't get past the [Error] Timed out waiting for emulator to be ready…

      — commented November 11th 2010 by Jesse Bilsten
  • @Albert, you have the platform 4 (API 1.6) installed installed? It is needed for building. You might also have a stuck adb process or it's not responding correctly which is a common occurrence for the adb server.

    What version of the Android tooling are you using and how recently did you install the Android tools and platforms. If it's been in the last couple of weeks. You may need to get a current CI build to handle the name change that Google did.

    Our continuous integration (CI) system provides updated builds approximately 30 minutes or less after a change has been committed to github. Please refer to our Continuous Builds for Download guide for obtaining one for your platform.

    — answered July 26th 2010 by Don Thorp
    permalink
    1 Comment
    • Thanks for the suggestions.

      I installed everything a week ago. I'm running titanium developer 1.2.1 which now (automatically?) updated the SDK to 1.4 I believe (where can I check that anyway?).

      At least I can choose 1.4 from the project edit screen, but it doesn't make any difference.

      I looked at your continuous build for download guide but I don't have any of the dirs (/programdata, windows 7) which are mentioned.

      I also killed the adb.process a couple of times and retried. Tried different projects (kitchen sink, and a hello world). Still no luck.

      — commented July 31st 2010 by Albert Skibinski
  • @Gregor, the emulator starts at all? Or your app launches on an already running emulator? Which case are you having?

    — answered July 26th 2010 by Don Thorp
    permalink
    0 Comments
  • I am having the same issue… Has anyone found a solution? This seems to be a ongoing issue.

    — answered September 14th 2010 by David Q
    permalink
    0 Comments
  • I had the same problem, but solution was not listed here : the problem came from my user home dir which had accent (i'm french).. Android sdk doesn't like that as he's using some core file access APIs that do not support extended charsets. Use only core ascii chars to spell you windows user name.

    — answered May 9th 2011 by Cedric NICOLAS
    permalink
    0 Comments
  • I think the SDKs are in the right place and Titanium saw them but cannot load and run them properly is'nt it about some more technical problem about the Tit IDE ?

    — answered July 12th 2011 by burhan cerit
    permalink
    0 Comments
  • [ERROR] Timed out waiting for emulator to be ready, you may need to close the emulator and try again…………..Im fed up with this problem……….please help i tried everthing stated above but of no use…..

    — answered December 21st 2011 by Rakesh Rangu
    permalink
    1 Comment
    • same here

      — commented January 14th 2012 by Carolien Corthouts
  • I get this

    [INFO] logfile = C:\Users\Ivica\My Documents\Titanium Studio Workspace\Kitchen Sink\build.log
    [INFO] Launching Android emulator…one moment
    [ERROR] Exception occured while building Android project:
    [ERROR] Traceback (most recent call last):
    [ERROR] File "C:\Users\Ivica\AppData\Roaming\Titanium\mobilesdk\win32\2.0.2.GA\android\builder.py", line 2112, in <module>
    [ERROR] s.run_emulator(avd_id, avd_skin, avd_name, add_args)
    [ERROR] File "C:\Users\Ivica\AppData\Roaming\Titanium\mobilesdk\win32\2.0.2.GA\android\builder.py", line 418, in run_emulator
    [ERROR] debug("From: " + self.sdk.get_emulator())
    [ERROR] TypeError: cannot concatenate 'str' and 'NoneType' objects

    And then this

    [INFO] logfile = C:\Users\Ivica\My Documents\Titanium Studio Workspace\Kitchen Sink\build.log
    [INFO] Building KitchenSink for Android … one moment
    [INFO] plugin=C:\Users\Ivica\AppData\Roaming\Titanium\plugins\ti.log\0.1\plugin.py
    [INFO] Detected compiler plugin: ti.log/0.1
    [INFO] Compiler plugin loaded and working for android
    [INFO] Titanium SDK version: 2.0.2 (05/30/12 10:21 2ff31a3)
    [ERROR] Timed out waiting for emulator to be ready, you may need to close the emulator and try again

    PLEASE HELP ! ! !

    — answered June 6th 2012 by Ivica Djordjevic
    permalink
    1 Comment
    • Oh yes, I am using all the latest builds…

      — commented June 6th 2012 by Ivica Djordjevic
  • Im also getting Timeout with Titanium SDK version: 2.1.1
    I am new to Titanium

    Error:

    [INFO] logfile = C:\Users\push\Documents\Titanium_Studio_Workspace\01\build.log
    [INFO] Launching Android emulator...one moment
    [ERROR] 'xcopy' is not recognized as an internal or external command,
    [ERROR] operable program or batch file.
    [ERROR] Exception occured while building Android project:
    [ERROR] Traceback (most recent call last):
    [ERROR]   File "C:\Users\push\AppData\Roaming\Titanium\mobilesdk\win32\2.1.1.GA\android\builder.py", line 2229, in <module>
    [ERROR]     s.run_emulator(avd_id, avd_skin, avd_name, avd_abi, add_args)
    [ERROR]   File "C:\Users\push\AppData\Roaming\Titanium\mobilesdk\win32\2.1.1.GA\android\builder.py", line 485, in run_emulator
    [ERROR]     avd_name = self.create_avd(avd_id, avd_skin, avd_abi)
    [ERROR]   File "C:\Users\push\AppData\Roaming\Titanium\mobilesdk\win32\2.1.1.GA\android\builder.py", line 408, in create_avd
    [ERROR]     available_avds = avd.get_avds(self.sdk)
    [ERROR]   File "C:\Users\push\AppData\Roaming\Titanium\mobilesdk\win32\2.1.1.GA\android\avd.py", line 23, in get_avds
    [ERROR]     for line in run.run([sdk.get_android(),'list','target'],debug=False).split("\n"):
    [ERROR] AttributeError: 'NoneType' object has no attribute 'split'
    
    [INFO] logfile = C:\Users\push\Documents\Titanium_Studio_Workspace\01\build.log
    [INFO] Building 03-01 Understanding Windows and Views for Android ... one moment
    [INFO] Titanium SDK version: 2.1.1 (07/27/12 14:01 0fd84a2)
    [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
    

    Also tried to kill adb.exe still no results

    • Windows 7 x64
    • Titanium SDK version: 2.1.1
    • android 2.3 sdk manager 20.0.3
    • java jdk 1.6

    Please help…

    — answered August 16th 2012 by techpush project
    permalink
    1 Comment
    • I do have exactly the same. Have you found a solution ?
      Thanks

      — commented April 5th 2013 by Mathieu Durand
  • There is an eclipse setting not exposed by the TitaniumStudio that will do this for you. In your workspace create a file: .metadata/.plugins/org.eclipse.core.runtime/.settings/com.android.ide.eclipse.ddms.prefs

    This file needs one line:
    com.android.ide.eclipse.ddms.timeOut=150000

    If you need more than 150000ms increase that value.

    — answered February 10th 2013 by Alec Feuerstein
    permalink
    1 Comment
    • Isn't there a way to set timeout value in Eclipse ?

      — commented May 3rd 2014 by John Mohan
  • This worked for me (Mac OS X 10.8.5, Titanium SDK 3.1.3.GA):

    Let the emulator starts and unlock it.

    Open the Terminal (Mac):

    cd [android-sdk-location]/platform-tools
    ./adb kill-server
    ./adb start-server
    

    If you use Windows go to the Command Prompt:

    cd [android-sdk-location]\platform-tools
    adb kill-server
    adb start-server
    

    Clean and build the project (Win and Mac).

    — answered November 13th 2013 by Daniele Grassi
    permalink
    1 Comment
    • Awesome. I have been trying get this working for ages. Seems many other posts were hovering around the solution, but these directions worked for me.

      — commented June 7th 2014 by Simon Cruthers
  • If you are still not able to find a work around , try following :

    Open Terminal :

    • cd path to your titanium project ( eg : /Users/namespace/Documents/Titanium_Studio_Workspace/Test )
    • type titanium build --platform android --build-only
    • type adb install -r &#x2F;Users&#x2F;namespace&#x2F;Documents&#x2F;Titanium_Studio_Workspace&#x2F;Test&#x2F;build&#x2F;android&#x2F;bin&#x2F;app.apk
    — answered February 24th 2014 by Sid Dev
    permalink
    3 Comments
    • Isn't there a way to set timeout value in Eclipse ?

      — commented May 3rd 2014 by John Mohan
    • Looking for device on cable instead of using emulator looks like a bug to me; see below

      — commented June 7th 2014 by John Mohan
    • Re; "Simon Cruthers commented on an answer:
      Awesome. I have been trying get this working for ages. Seems many other posts were hovering around the solution, but these directions worked for me."

      This cant possibly work. The "build only" option guarantees that he emulator won't launch. All this does is compile.

      — commented June 9th 2014 by John Mohan
  • Same problem. Running Ti.Studio 3.2.3 w SDK 3.1.3 on W7. Increased ADB timeout on Eclipse but didn't help.
    Also killed/started server. Here's build log. Why is it looking for emulator on cable ?
    [DEBUG] C:\Users\John\Documents\Titanium Studio Workspace II\mobilesdk\win32\3.1.3.GA\android\builder.py install UMe C:\Users\John\AppData\Local\Android\android-sdk C:\Users\John\Documents\Titanium Studio Workspace\CQUOT com.cameronia.cquot 1
    [INFO] Titanium SDK version: 3.1.3 (09/18/13 12:00 222f4d1)
    [DEBUG] Waiting for device to be ready …
    [TRACE] adb devices returned 0 devices/emulators
    [TRACE] adb devices returned 0 devices/emulators
    [TRACE] adb devices returned 0 devices/emulators
    [TRACE] adb devices returned 0 devices/emulators
    [TRACE] adb devices returned 0 devices/emulators
    [TRACE] adb devices returned 0 devices/emulators
    [TRACE] adb devices returned 0 devices/emulators
    [TRACE] adb devices returned 0 devices/emulators
    [TRACE] adb devices returned 0 devices/emulators
    [TRACE] adb devices returned 0 devices/emulators
    [ERROR] Timed out waiting for device to be ready, you may try reconnecting the USB cable

    — answered June 6th 2014 by John Mohan
    permalink
    1 Comment
    • Looking for device on cable instead of using emulator looks like a bug to me

      — commented June 6th 2014 by John Mohan
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.