更新时间:2022-09-28 23:41:26
Ian Darwin
1.4.1 问题
你打算用Eclipse开发Android应用程序。
1.4.2 解决方案
安装Eclipse、Android SDK和ADT plug-in。创建项目并开始编写应用程序。从Eclipse中构建项目并在模拟器下测试。
1.4.3 讨论
安装如下软件之后,就可以开始开发了:
Eclipse IDE
Android SDK
ADT plug-in
安装上述三个软件的详细讲解请参见攻略1.5。
首先,从File→New菜单创建一个新项目(见图1-1)。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_vertical"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
android:gravity="center_horizontal"
/>
</LinearLayout>