安卓感悟第二篇

Create a Projectwith Eclipse

利用Eclipse创建项目


1.   Click New   in the toolbar.

在工具栏上点击新建按钮

1.   In the window that appears, open the Android folder,select Android Application Project, and click Next.

在显示的窗口上,打开安卓文件夹,选择安卓应用程序项目,并且点击Next

Figure 1. The New Android App Project wizardin Eclipse.

1.   Fill in the form that appears:

在显示的框架中填充所要填写的内容

·        Application Name is the app name that appears to users. For thisproject, use "My First App."

·        应用程序名就是呈现给用户的app的名称,对于这个程序来说,用"My First App."作为它的用户名

·        Project Name is the name of your project directory and the name visible inEclipse.

·        项目名就是你项目目录的名称和而且在Eclipse中名字可见

·        Package Name is the package namespace for your app (following the same rules aspackages in the Java programming language). Your package name must be uniqueacross all packages installed on the Android system. For this reason, it'sgenerally best if you use a name that begins with the reverse domain name ofyour organization or publisher entity. For this project, you can use somethinglike "com.example.myfirstapp." However, you cannot publish your appon Google Play using the "com.example" namespace.

·        包名就是你的app的命名域(在Java编程语言中依照包中的命名规范来实现代码的相应实现)。你的包名必须在安卓系统中是唯一的,因此一般而言,如果你定义一个整个项目组织的主要名称或者是发布者的实体的时候,你最好使用不同的名称,对于这个项目,你可以使用一些像"com.example.myfirstapp."的名称,然而,你不能将"com.example"的命名域发布在谷歌上,(因为这种的命名域并不规范)

·        Minimum Required SDK is the lowest version of Android that your appsupports, indicated using the API level. To support as many devices as possible, you shouldset this to the lowest version available that allows your app to provide itscore feature set. If any feature of your app is possible only on newer versionsof Android and it's not critical to the app's core feature set, you can enablethe feature only when running on the versions that support it (as discussedin Supporting Different Platform Versions). Leave this set to the default value for thisproject.

·        最低程度需要的SDK就是你安卓app所支持的最低版本,表明着你API水平,为了支持尽可能多的设备,你应该设置最低版本的sdk来使得你的app提供核心设置,如果你的app任何特点只是针对于最新版本的安卓而不是针对于你app核心特点设置,你只能使用这种特别的功能在你机器所支持的情况下才可以(就像争议的多平台版本)。没有这种设置,只能在这个程序下就以默认值定义这个项目。

·        Target SDK indicates the highest version of Android (also using the API level) with which you have tested with your application.

目标SDK表明最高版本的Android使用API级别()在测试您的应用程序。

As new versions of Android become available, youshould test your app on the new version and update this value to match thelatest API level in order to take advantage of new platform features.

随着新版本的Android可用时,你应该在新版本上测试你的应用程序和更新这个值以匹配最新的API级别,以利用新的平台特性。

·        Compile With is the platform version against which you will compile your app. Bydefault, this is set to the latest version of Android available in your SDK.(It should be Android 4.1 or greater; if you don't have such a versionavailable, you must install one using the SDK Manager). You can still build your app to support olderversions, but setting the build target to the latest version allows you toenable new features and optimize your app for a great user experience on thelatest devices.

·        编译的平台你会编译你的应用程序的版本。默认情况下,这是设置为可用的最新版本的Android SDK。

·        (它应该是Android 4.1或更高版本,如果你没有这样一个可用的版本,您必须安装一个使用SDK的管理器),你仍然可以构建应用程序来支持旧版本,但设置构建目标到最新版本允许您启用新特性和为一个伟大的用户体验优化你的应用程序的最新设备。

·        Theme specifies the Android UI style to apply for your app. You can leavethis alone.

·        ·指定AndroidUI主题风格申请应用程序,你可以这样

Click Next.

点击下一个

1.   On the next screen to configure the project, leave thedefault selections and click Next.

在下一个屏幕上配置项目,保留默认选项并单击next。

2.   The next screen can help you create a launcher icon foryour app.

在下一个屏幕上可以帮助你为你的应用创建一个启动器图标。

You can customize an icon in severalways and the tool generates an icon for all screen densities. Before youpublish your app, you should be sure your icon meets the specifications definedin the Iconography designguide.

你可以定制一个图标在几个方面,对所有屏幕密度工具生成一个图标。在你发布你的应用程序之前,你应该确保你的图标符合规范中定义的图解设计指南。

Click Next.

点击下一个

3.   Now you can select an activity template from which tobegin building your app.

For this project, select BlankActivity andclick Next.

现在你可以选择一个活动的模板开始构建应用程序。
对于这个项目,选择BlankActivity并单击Next。

4.   Leave all the details for the activity in their defaultstate and click Finish.

Your Androidproject is now a basic "Hello World" app that contains some defaultfiles. To run the app, continue to the next lesson.

离开默认状态的活动的所有细节并单击Finish。
你的Android项目现在是一个基本的“HelloWorld”应用程序,其中包含一些默认的文件。要运行应用程序,继续下一个教训。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值