Emulator does not launch

Discussion in 'Questions' started by rfresh, Mar 2, 2012.

  1. rfresh

    rfresh Well-Known Member Licensed User

    For some reason my emulator does not launch now from my IDE. When I click on Tools->Run AVD Manager a cmd window quickly opens and then closes and nothing else.

    I tried to start up the emulator from the android-sdk folder but the same thing happens. I also cannot start up the SDK Manager.

    My paths have not changed and are still set in the IDE.

    What can I check?

    Thanks...
     
  2. peacemaker

    peacemaker Well-Known Member Licensed User

    reinstall sdk
     
  3. rfresh

    rfresh Well-Known Member Licensed User

    Done, however, that didn't seem to make any differences. The AVD and SDK Managers still won't launch (from the IDE nor from the android-sdk folder when I click on their .exe files).
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Did you try to run SDK Manager from the command line? Hopefully it will allow you to see the error message.
     
  5. rfresh

    rfresh Well-Known Member Licensed User

    I opened a cmd window on my Win7 and tried to run AVD Manager.exe but it won't run. Because of the space I seem to recall you need to add quotes like "AVD Manager.exe" but that doesn't run it either.

    For some reason I lost the ability to run AVD from the IDE. I've re-installed the SDK and B4A but I still can't get the AVD to start up!
     

    Attached Files:

    • 0.jpg
      0.jpg
      File size:
      39.1 KB
      Views:
      38
    Last edited: Mar 10, 2012
  6. rfresh

    rfresh Well-Known Member Licensed User

    Update:

    I got AVD to run from the IDE and from the cmd line by setting the file (AVD Manager.exe) properties to Run as Administrator. I set this in the installation file so I thought that would carry thru to all of the files installed but apparently not.
     
  7. Guardian17

    Guardian17 Member Licensed User

    Also Have AVD Manager Problems

    I've just installed Basic4Android. I have the same problem with the AVD Manager -- if I click on it from the Tools Menu, or try running it directly from the folder where it's located, I briefly see what looks like a command window open, but the window immediately disappears. I tried the "Run as Administrator" fix in the Properties for "AVD Manager.exe", but this did not help. I tried re-booting the computer, just in case that needed to be done, but AVD Manager still does the same thing.

    My "AVD Manager.exe" file is located in this folder (no spaces in path):

    C:\AndroidDev\android-sdk-windows

    I had Java 7 and the Android SDK installed (prior to installing Basic4Android) when attempting to learn Android Programming in Eclipse, (which was very difficult -- hence the reason for trying Basic4Android), and the AVD Manager still works fine from Eclipse.

    Any further ideas on what might be wrong with my setup?
     
  8. JonPM

    JonPM Well-Known Member Licensed User

    Have you tried reinstalling Android sdk?
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    Have you tried to open AVD Manager from the command line?

    You can also try to start SDK Manager and then open AVD Manager from the Tools menu.
     
  10. Guardian17

    Guardian17 Member Licensed User

    As far as "re-installing" Android SDK, all I have is the following .ZIP file:

    android-sdk_r18-windows.zip

    which I re-extracted. This placed "AVD Manager.exe" and "SDK Manager.exe" in my "android-sdk-windows" folder. Tried again to run both programs, but all they do is VERY temporarily open a command window which immediately disappears. Is there some other method to "install" the Android SDK? There is no "Android SDK" in my list of installed programs that can be uninstalled. I'm running Windows 7 Home Premium SP1.

    Did some investigating. Found out that I have SIX "AVD Manager.exe" files on my C:\ Drive. Only two of them are in a "...tools\lib" folder (neither of these being one where I did the ZIP file extraction), and when I try to run these two from their folders in Windows, they open in a command window, but I get an error saying that the "android.bat" file cannot be found. The "android.bat" files are found in the associated next higher "...tools" folder. The other four "AVD Manager.exe" files do the original brief opening of a command window and then the window disappears.

    If I try running the "SDK Manager.exe" files found in the same folders as the "AVD Manager.exe" files, I get the same kind of results -- four open the brief command windows, and the other two lead to the "android.bat file can't be found" message.

    Why can Eclipse open and, I assume, run one of these, but I can't do it manually, and which one is it that runs?

    Incidentally, can only try running any of these files from a command window prompt by placing the whole file name in quotes (due to the space found in the file name). If I run the file name using quotes, or re-name the file to not have a space, I get the same "android.bat file not found" error.
     
  11. Erel

    Erel Administrator Staff Member Licensed User

  12. Guardian17

    Guardian17 Member Licensed User

    Well, this is "fun".
    (Thanks so much, Erel, for the replies to my problem).

    I downloaded the installer as you suggested. When I run the installer, it performs a check to see if the Java SE Development Kit is installed. It comes up with an error saying it "failed to find Java version for 'C:\Windows\system32\java.exe' [2] The system cannot find the file specified."

    I searched for "java.exe" on my computer and found one in the "C:\Windows\system32" folder, and its version, found by checking the file's properties, is "7.0.40.22". So I don't know if the error is saying that it can't discern what the ***Version*** of the java.exe file is, or whether it for some reason can't find that file, which is obviously where it should be.

    I tried the suggestion of "simply setting an environmental variable JAVA_HOME to point to the JDK", which I assume to mean to set the JAVA_HOME value to "C:\Windows\system32\java.exe". If it should "point" to something else, that is not clear. When I do this, I still get the same error when I try to run the installer.
     
  13. Erel

    Erel Administrator Staff Member Licensed User

    Java usually installs under Program Files or Program Files (x86). Start with installing Java JDK (follow the link in the downloads page).
     
  14. Guardian17

    Guardian17 Member Licensed User

    Thanks again, Erel.

    I do have Java in "Program Files", but I'll try re-installing Java later tonite.

    Shall I assume I should first uninstall anything that was installed on the same date of 5/25/2012, or will the new install install over what already exists?

    These Java items have that date (there are no other Java items listed):
    Java SE Development Kit Update 4 (64-bit)
    Java(TM) 7 Update 4 (64-bit)
    JavaFX 2.1.0 (64-bit)
    JavaFX 2.1.0 SDK (64-bit)

    ...and if so, is there any best order of uninstalling one item before any other to avoid conflicts?
     
  15. Guardian17

    Guardian17 Member Licensed User

    Erel:

    I uninstalled the four Java items I had mentioned, then I downloaded and ran the Java7 installer. I was left with these items installed:

    Java 7 Update 7 (64-bit) Version 7.0.70
    Java SE Development Kit 7 Update 7 (64-bit) Version 1.7.0.70

    I then ran the Android SDK "installer_r20.0.3-windows.exe" that I had already downloaded yesterday. Got the same error as before when I ran the Android SDK installer. I then deleted this installer after checking the file size in bytes and re-downloaded the Android SDK installer. The file size was exactly the same, and I again got the same error.

    I also tried changing the JAVA_HOME environmental variable to "C:\Program Files\Java\jdk1.7.0_07\bin", where there was a new java.exe application, but I got the same error again for the Android SDK installer. I also changed the JAVA_HOME variable to "C:\Windows\system32", and then separately with JAVA_HOME set to "C:\Windows\system32\java.exe". Still the same error in both cases.

    Needless to say, this is getting quite frustrating. Do you have any other suggestions? Should I contact Oracle?
     
  16. Guardian17

    Guardian17 Member Licensed User

    Problem Solved

    Erel:

    My sincerest apologies. :eek: Your installation instructions DO SAY:

    Select "Windows x86 (32-bit)" in the platforms list (also for 64 bit machines).

    I mistakenly DID NOT READ (or fully comprehend) this, and I installed the 64-bit version of Java.:BangHead:

    After performing the installations as instructed for the 32-bit version, the Android SDK installer ran just fine.:D

    As silly as it may sound, maybe you could put a cautionary note for idiots like me that don't follow explicit directions and think that
    "since I have a 64-bit operating system, I should install the JDK 64-bit version",
    that the 64-bit JDK is not (currently) compatible with the current Android SDK?

    Thanks for your attempted help, and I apologize for needless input on your part.
     

Share This Page

Loading...