Android Launch is Failing

IAmYourFaja picture IAmYourFaja · Jan 3, 2012 · Viewed 12.1k times · Source

I am trying to develop my first Android app through the ADT plugins for Eclipse. I have downloaded and installed both ADT and the Android SDK and have created a HelloAndroid Android project. I created a new AVD called HelloAndroidEmulator1 just for testing my HelloAndroid app.

When I go to run my project (rooted at HelloAndroidActivity.java which was autogenerated for me), I'm getting some bizarre errors. I have not changed any of the source code that Eclipse generated for me, and have not added any of my own code. I'm simply trying to compile and run what was autogenerated.

When I look in the layout/main.xml file's Graphical Layout, I see a rendering of my app displaying the text:

HelloAndroid

Hello World, HelloAndroidActivity!

Where HelloAndroid is the name of my Eclipse project and HelloAndroidActivity is the name of my main driver that Eclipse makes for me.

When I go to actually run the application, I do not get anything like that output at all. The emulator loads up, and after about 60 seconds of displaying the startup "android" splash screen, it starts to load up but then gives me an error:

Launcher is not responding. Would you like to close it?

Back inside Eclipse, my console output looks like this (after I've closed the launcher):

[2012-01-03 11:23:23 - HelloAndroid] ------------------------------
[2012-01-03 11:23:23 - HelloAndroid] Android Launch!
[2012-01-03 11:23:23 - HelloAndroid] adb is running normally.
[2012-01-03 11:23:23 - HelloAndroid] Performing       net.me.myprojects.android.proj.HelloAndroidActivity activity launch
[2012-01-03 11:23:23 - HelloAndroid] Automatic Target Mode: Preferred AVD 'HelloAndroidEmulator1' is not available. Launching new emulator.
[2012-01-03 11:23:23 - HelloAndroid] Launching a new emulator with Virtual Device 'HelloAndroidEmulator1'
[2012-01-03 11:23:36 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error
[2012-01-03 11:23:36 - HelloAndroid] New emulator found: emulator-5554
[2012-01-03 11:23:36 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2012-01-03 11:25:00 - HelloAndroid] HOME is up on device 'emulator-5554'
[2012-01-03 11:25:00 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'
[2012-01-03 11:25:00 - HelloAndroid] Installing HelloAndroid.apk...
[2012-01-03 11:27:03 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!
[2012-01-03 11:27:03 - HelloAndroid] (null)
[2012-01-03 11:27:03 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554': EOF
[2012-01-03 11:27:03 - HelloAndroid] com.android.ddmlib.InstallException: EOF
[2012-01-03 11:27:03 - HelloAndroid] Launch canceled!

I tried searching online but couldn't find anything that jumped out as being the clear culprit. I must not have something installed or configured correctly, but I can confirm that:

  • ADT is installed inside Eclipse
  • The SDK is installed under C:\Users\me\android-sdk
  • I can open and edit both the SDK and AVD Managers

Edit: Here is the source for HelloAndroidActivity.java:

package net.me.myprojects.android.proj;

import android.app.Activity;
import android.os.Bundle;

public class HelloAndroidActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}

Any ideas as to what is happening here?!?! Thanks in advance!

Answer

Luis Valdés picture Luis Valdés · Sep 10, 2012

Make sure your Virtual Device has a valid SD card size (i.e. bigger than 0)