2014/5/19翻译(2)

来源:互联网 发布:2016年进出口贸易数据 编辑:程序博客网 时间:2024/05/16 10:23

Create a Project with Eclipse


  1. Click New  in the toolbar.
  2. In the window that appears, open the Android folder, select Android Application Project, and click Next.

    Figure 1. The New Android App Project wizard in Eclipse.

  3. Fill in the form that appears:
    • Application Name is the app name that appears to users. For this project, use "My First App."

    • Project Name is the name of your project directory and the name visible in Eclipse.
    • Package Name is the package namespace for your app (following the same rules as packages in the Java programming language). Your package name must be unique across all packages installed on the Android system. For this reason, it's generally best if you use a name that begins with the reverse domain name of your organization or publisher entity. For this project, you can use something like "com.example.myfirstapp." However, you cannot publish your app on Google Play using the "com.example" namespace.
    • Minimum Required SDK is the lowest version of Android that your app supports, indicated using the API level. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set. If any feature of your app is possible only on newer versions of Android and it's not critical to the app's core feature set, you can enable the feature only when running on the versions that support it (as discussed in Supporting Different Platform Versions). Leave this set to the default value for this project.
    • Target SDK indicates the highest version of Android (also using the API level) with which you have tested with your application.

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

    • Compile With is the platform version against which you will compile your app. By default, 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 version available, you must install one using the SDK Manager). You can still build your app to support older versions, but setting the build target to the latest version allows you to enable new features and optimize your app for a great user experience on the latest devices.
    • Theme specifies the Android UI style to apply for your app. You can leave this alone.

    Click Next.

  4. On the next screen to configure the project, leave the default selections and click Next.
  5. The next screen can help you create a launcher icon for your app.

    You can customize an icon in several ways and the tool generates an icon for all screen densities. Before you publish your app, you should be sure your icon meets the specifications defined in the Iconography design guide.

    Click Next.

  6. Now you can select an activity template from which to begin building your app.

    For this project, select BlankActivity and click Next.

  7. Leave all the details for the activity in their default state and click Finish.

Your Android project is now a basic "Hello World" app that contains some default files. To run the app, continue to the next lesson.

翻译:

1、点击工具栏上的New 

2、在出现的窗口中,打开Android的文件夹,选择Android的应用程序项目,然后单击下一步

3、在出现的表单填写:

Application Name是出现给用户的应用程序名称。对于这个项目,使用“我的第一个应用程序。”

Project Name就是你的项目目录的名称,名称在Eclipse中可见

Package Name是你项目包的命名空间(下面的Java编程语言中有相同规则的包)。你的包的名称必须和在整个安装Android系统上的所有软件包名不同。因此,他通常是最好的是你使用一个名称作为一个反转域名开始到组织或出版实体。在你的项目中,你可以使用类似"com.example.myfirstapp"的包名。但是你不能以"com.example"命名空间在谷歌发布你的应用程序。

Minimum Required SDK是你的安卓应用程序支持的最低版本,也可以用API  LEVEL表示。为了尽可能支持更多的设备,你应该是用可用的最低版本来允许你的程序实现核心功能集。如果你的应用程序的所有功能只可以再较高版本的安卓上实现那他并不是程序的核心功能集的关键,只有它能够支持在不同平台版本中讨论,你才可以启用该功能。在这个项目中将他设置为默认值。

Target SDK 表示了你的程序支持安卓应用程序测试的最高版本。当新的安卓版本问世后,你应该在新的版本中测试、匹配你的程序以便于在心的平台功能中取得优势。

Compile With是平台针对你将编译的应用程序提供的版本。在默认情况下,它会在你的SDK中设置最新的安卓版本。你也可以设置你的应用程序支持旧的版本,但是设置最新版本的目的是允许你启用新功能和优化你的应用程序最新的设备和出色的用户体验。

Theme为你的应用程序指定的安卓的UI风格,你可以不用管这一点。


点击下一步。


4.在下一个界面配置项目,保留默认选项,点击下一步。

5.下一个界面可以帮助你设置应用程序的图标。

你可以通过多种途径来定制你的图标并且该工具生成所有的屏幕密度的图标。在你点击完成项目之前,你要确定你的图标符合指南中定义的规范。


点击下一步。


6.现在你可以选择一个活动模板来建立你的应用程序。

在这里,选择BlankActivity并点击下一步。

7.保留活动的默认选项,并单击完成。


你的安卓项目现在是一个基本的“Hello World”应用程序,它包含了一些默认的文件。运行应用程序,继续下一节内容。

0 0
原创粉丝点击