各位好:
我是android初学者,今天照着android guide这个书上的例子做了第一个android程序。能够正常运行,但在运行后没有出现我想要的字符串,在屏幕显示的是 “ANDROID” 修改textview内容也不起作用 不知道是什么原因,请各位指教一下。谢谢。我是在WINDOWS上用的 eclipse 是 200909月的新版 
用android sdk 1.1 1.5 1.6都试过 都不行 
配置是照着书上的的步骤来的 

解决方案 »

  1.   

    全文搜索“ ANDROID”,看看这个字符串是哪里定义的
      

  2.   

    好像可以这样写现实hello world
    package com.android.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);
       }
    }
      

  3.   

    helloWorld.java文件package com.example.helloandroid;import android.app.Activity;
    import android.os.Bundle;public class HelloAndroid extends Activity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
        }
    }
    main.xml 文件<?xml version="1.0" encoding="utf-8"?>
    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:text="@string/hello"/>
    strings.xml文件<?xml version="1.0" encoding="utf-8"?>
    <resources>
        <string name="hello">Hello, Android! I am a string resource!</string>
        <string name="app_name">Hello, Android</string>
    </resources>
      

  4.   

    呵呵,全文搜索java文件没有用,估计在layout的string.xml文件中
      

  5.   

    不怕大家笑话
    可能和我第一次写Hello World时一样土
    模拟器刚启动时显示Android来着 这时系统还没启动完毕
    要等一会才会进系统,然后才进你写的程序。
      

  6.   

    是不是程序还没启动啊,emulator启动要不少时间的,emulator启动期间屏幕一直在显示ANDROID?
      

  7.   

    我觉得8楼说的极为有道理...你再等等!要先看到android程序的主界面!