更新时间:2023-02-06 11:39:51
Android的文档非常出色。下面是一个Hello World应用程序:
Android's documentation is excellent. Here's a hello world app:
http://developer.android.com/guide/tutorials/hello-world.html
只要修改
tv.setText("Hello, Android");
到
tv.setText("Random Number: " + Math.random());
和确保导入数学库(如果你使用Eclipse,按Ctrl + Shift + O)。
and make sure to import the Math library (if you're using eclipse, hit Ctrl+Shift+O).