Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Discussion > Android Lounge

Android Lounge A place for general Android discussion and questions.



Reply
 
LinkBack Thread Tools
Old February 12th, 2012, 06:20 AM   #1 (permalink)
New Member
 
Join Date: Jan 2011
Posts: 6
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Android Hello world is not working in Emulator

I am a newbie in Android . When I run my first **HelloWorld** program I face the same problem. I cannot get the text with "Hello World" . I got the emulator with it's options .
Do any one can say what's my problem ? I am working in Windows 7.

my code is given below:

HelloAndroidActivity.java
===========================
package com.example.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

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);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);

}
}

AndroidManifest.xml
=======================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloandroid"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="14" />

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".HelloAndroidActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>


please advise me , add the Emulator output I got.

Thanks
Anes
Attached Images
File Type: jpg android doubt preview.jpg (59.1 KB, 2 views)

flipmedia is offline  
Reply With Quote
Sponsors
Old February 12th, 2012, 09:49 AM   #2 (permalink)
Member
 
Join Date: Jan 2012
Location: Townsend, DE
Posts: 103
 
Device(s): iPod, Razr Maxx
Thanks: 7
Thanked 13 Times in 10 Posts
Default

I typed exactly what your code says, and mine runs fine.

Did you wait for the emulator to finish loading? Judging by the attached picture in your post, the emulator wasn't loaded all the way. It does take a few moments to load.
javasirc is offline  
Reply With Quote
Old February 13th, 2012, 10:22 AM   #3 (permalink)
New Member
 
Join Date: Jan 2011
Posts: 6
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Wink

Hi Javasirc,
Thanks for your reply. Dear I wait 3 minutes and fully loaded ... please look
the screenshot as I reach ... reply me

Thanks
Anes
Attached Images
File Type: jpg revisedpic.jpg (46.5 KB, 1 views)
flipmedia is offline  
Reply With Quote
Old February 13th, 2012, 01:43 PM   #4 (permalink)
Member
 
Join Date: Jan 2012
Location: Townsend, DE
Posts: 103
 
Device(s): iPod, Razr Maxx
Thanks: 7
Thanked 13 Times in 10 Posts
Default

Slide the lock thing to the right. It will unlock. When it does it will load your app.

Note that the emulator runs very slow. Just be patient with it.

And as a tip, you do not need to close your emulator. Just use Run Configuration when you run the app and select the emulator. It will automatically resend your app to the emulator and reload it.
javasirc is offline  
Reply With Quote
Reply

Bookmarks

Tags
android, hello world


Go Back   Android Forums > Android Discussion > Android Lounge User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 05:08 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo