运行前查看过AVD都有,可就是不出效果
这是日志:
[2010-06-01 17:00:32 - helloWorld1] ------------------------------
[2010-06-01 17:00:32 - helloWorld1] Android Launch!
[2010-06-01 17:00:32 - helloWorld1] adb is running normally.
[2010-06-01 17:00:32 - helloWorld1] Performing com.eoewichina.helloWorld activity launch
[2010-06-01 17:00:32 - helloWorld1] Automatic Target Mode: Preferred AVD 'sdk_1_5_version' is not available. Launching new emulator.
[2010-06-01 17:00:32 - helloWorld1] Launching a new emulator with Virtual Device 'sdk_1_5_version'
[2010-06-01 17:00:51 - helloWorld1] New emulator found: emulator-5554
[2010-06-01 17:00:51 - helloWorld1] Waiting for HOME ('android.process.acore') to be launched...运行出来一直显示是android ;并没有我要的“hello world!!"望大家指证:
package com.eoewichina;import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class helloWorld 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 world!!!!!!");
setContentView(tv);
}
}
这是运行的代码!!!!!!
这是日志:
[2010-06-01 17:00:32 - helloWorld1] ------------------------------
[2010-06-01 17:00:32 - helloWorld1] Android Launch!
[2010-06-01 17:00:32 - helloWorld1] adb is running normally.
[2010-06-01 17:00:32 - helloWorld1] Performing com.eoewichina.helloWorld activity launch
[2010-06-01 17:00:32 - helloWorld1] Automatic Target Mode: Preferred AVD 'sdk_1_5_version' is not available. Launching new emulator.
[2010-06-01 17:00:32 - helloWorld1] Launching a new emulator with Virtual Device 'sdk_1_5_version'
[2010-06-01 17:00:51 - helloWorld1] New emulator found: emulator-5554
[2010-06-01 17:00:51 - helloWorld1] Waiting for HOME ('android.process.acore') to be launched...运行出来一直显示是android ;并没有我要的“hello world!!"望大家指证:
package com.eoewichina;import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class helloWorld 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 world!!!!!!");
setContentView(tv);
}
}
这是运行的代码!!!!!!
解决方案 »
- 求救:android 打开pc上网络共享文件夹上的文件 例如:\\192.168.10.220\vss\pengqh.xls
- 大公司Android开发框架有哪些?
- 关于android蓝牙打印的问题
- 如何对于一个LinearLayout布局进行封装,要继承自哪个类
- ListView中子项内怎么访问?
- 急!win7和Ubuntu10.04双系统,安装了android-x86 4.0后怎么恢复以前的ubuntu?
- 请问继承dialog后,最外面的padding怎样获得?
- 有没有类似getString的函数,根据id取得资源中的颜色?
- 做移动应用APP,一套java后台可否搞定android和ios? 急求答案,解决方案
- Androidstudio打开遇到问题有没有大神指点迷津
- android framework层的网络选择问题!!!!!
- 如何使应用在执行时先搜索包内的类,再搜索framework中的类?
setContentView(R.layout.main);
在Activity中获取 LinearLayout layout=(LinearLayout)findView(R.id.layoutid)
TextView tv=new TextView(this);
tv.setText("hello world!!!!!!");
layout.addView(tv);
还有 LZ的问题究竟是系统启动不起来还是没程序启动不起来哦?
tv.setText("HelloWorld!!!");
试一下,应该是这样,与君共勉!!!!