Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse created app won't run in Android emulator

I am new to Eclipse and Android programming and trying to teach myself how to create android apps.The problem is apps won't run in emulator.

  1. I have installed Eclipse SDK Version: 3.7.2.

  2. I have installed Android SDk and AVD

  3. I have created "HelloWorld" app from Eclipse.

  4. Press F11 to run "HelloWorld.

  5. Mesasge occurs : "The connection to adb is down, and a severe error has occured."

  6. No Android emulator is running.

  7. Check on android sdk directory, adb.exe is there.

  8. Press F11 again,

  9. Android emulator started but "HelloWorld" app is not running

  10. No "HelloWorld" app in app manager either.

  11. I have delete R.java and run again, result is the same (no "HelloWorld" app running).

  12. I have killed adb.exe process and run again, result is the same (no "HelloWorld" app running).

Below is code from main.xml

<?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/hello" />

    <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="This is my first Android Application" />

    <Button
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="And this is a clickable button" />

    </LinearLayout>

=====================================================================

please advice how to remedy this.

Additional info: I have download all packages (+extras) and created the Virtual Device. Virtual Devices

Message from Console Message from console

Is there something missing?

There is a exclamation mark on line 15 & 20 (indicated in red box) does this cause the problem? error in code


Dear All,

Thanks for advice. After going through the forum, it seems that Android doesn't work well with 64bit application/OS (but some claimed it can work). I am using Win7 64bit + Eclipse 64bits. I am sorry that this information is not provided in the first place, maybe things could be resolve faster.

At the moment, the problem is not solved, I just create a virtual PC (in XP mode) and run everything in 32bit. So far everythings works fine.

Special thanks to AndroDev for continuous help in this problem.


like image 343
skytzoo Avatar asked Jan 20 '26 23:01

skytzoo


1 Answers

in your eclipse there is a icon for Android VDM. Just click on that icon. After that click on new button. Give the name -->> select the target -->> click on create AVD. after the run your project as Android Application. may this will help you

like image 177
Vinit ... Avatar answered Jan 22 '26 12:01

Vinit ...