• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Hello World application not showing

Hi guys

Sorry to bore you with a 'Hello World' question. The problem is I can't get my application to show 'Hello World'. My emulator loads fine and the device is started. From here i drag the locked icon across which takes me to the main screen but it doesn't have hello world anywhere.

I searched everywhere for a solution and still can't do a basic hello world application. Any help I will vastly appreciate.

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, Android");
        setContentView(tv);
    }
}
 
hi JiMMaR, thanks a million! I finally got it show, the only problem is that it doesn't always work. When I run it again it says: emulator: ERROR: the user data image is used by another emulator. aborting

Sometimes it doesn't show that and will show hello world. Any suggestions?
 
Back
Top Bottom