`
suky
  • 浏览: 144785 次
  • 性别: Icon_minigender_2
  • 来自: 厦门
社区版块
存档分类
最新评论

Android第一个程序 Hello World

阅读更多

 

 

Create a New Android Project

 

From Eclipse, select File -> New -> Project



 

 

Make the changes below to our HelloWorld.java

 

package com.suky.example;

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

 

 

Run our applications: select Run -> Open Run Dialog


  • 大小: 22.6 KB
  • 大小: 24.8 KB
  • 大小: 72.4 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics