#1
  1. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2006
    Posts
    529
    Rep Power
    58

    Hello Android app


    Hi all, i've just installed android plugin and avd on my dev machine and have just done the first tutorial on developer.android.com.

    java Code:
     
    package com.example.helloandroid;
     
    import android.app.Activity;
    import android.os.Bundle;
    import android.widget.TextView;
     
    public class HelloAndroid extends Activity {
       /** Called when the activity is first created. */
       @Override
       public void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           TextView tv = new TextView(this);
           tv.setText("Hello");
           setContentView(tv);
       }
    }


    When i run the app in the emulator the String printed is "Android" not "Hello". Can anyone tell me why the correct String is not being printed? it's like it's not my source file being run.

    this is what is printed to console:

    [2010-11-28 16:01:11 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'my_avd'
    [2010-11-28 16:01:11 - HelloAndroid] Launching a new emulator with Virtual Device 'my_avd'
    [2010-11-28 16:01:13 - HelloAndroid] New emulator found: emulator-5554
    [2010-11-28 16:01:13 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
    [2010-11-28 16:01:37 - HelloAndroid] emulator-5554 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!


    thanks mat.
    Last edited by turtleboy; November 28th, 2010 at 11:14 AM.

IMN logo majestic logo threadwatch logo seochat tools logo