且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

创建新的 Android 应用程序项目时 Eclipse Kepler 崩溃

更新时间:2022-06-03 06:07:07

如果您使用 Eclipse 构建 Android,请按顺序执行以下操作:

If you're using Eclipse to build Android, do the following in order:

  1. 从 Oracle 安装 JDK.您可以在这里获取 JDK.

  1. Install the JDK from Oracle. You can get the JDK here.

安装 Eclipse(例如 Eclipse 标准版).截至 2013 年 11 月,Juno (Eclipse v4.2.2) 是 Eclipse 最稳定的版本.暂时不要使用 Kepler 版本.您可以在这里获得旧的、稳定的 Eclipse 版本.或者,新版本 here 如果它是稳定的.重要提示:安装 Eclipse 时,不要覆盖现有的 Eclipse 安装目录,而是创建一个新目录并在其中安装 Eclipse.这将防止在不同版本的 Eclipse 之间混淆库.

Install Eclipse (e.g. Eclipse Standard version). As of November 2013, Juno (Eclipse v4.2.2) is the most stable release of Eclipse. Refrain from using Kepler release for now. You can get old, stable release of Eclipse here. Or, new version here if it is stable. Important: When you install Eclipse, do not overwrite an existing Eclipse installed directory but instead create a new directory and install Eclipse there. This would prevent getting libraries mixed up between different versions of Eclipse.

安装 Android SDK.您可以在这里获取 SDK.对于初学者,请选择 installer_r22.3-windows.exe 软件包.

Install the Android SDK. You can get the SDK here. For beginners, choose the installer_r22.3-windows.exe package.

安装 Android 开发工具 (ADT).您可以在这里获取 ADT.

Install the Android Development Tools (ADT). You can get the ADT here.

启动 Eclipse.

Start Eclipse.

从 Eclipse 的菜单中,选择 Window |首选项.然后,选择 Java |已安装 JREs 选项.检查 Eclipse 是否正确列出了上面第 1 步创建的 JDK 安装目录.如果没有,请单击 添加 按钮并浏览到您的 JDK 安装目录.在 Windows 上,此目录通常位于 C:Program FilesJavajdk1.6.0_45 下(例如 Java 1.6 release 45).

From Eclipse's menu, select Window | Preferences. Then, select Java | Installed JREs option. Check to see if Eclipse has listed correctly the JDK installed directory created from step 1 above. If not, click Add button and browse to your JDK installed directory. On Windows, this directory is normally found under C:Program FilesJavajdk1.6.0_45 (e.g. Java 1.6 release 45).

在 Eclipse 的 Preferences 屏幕中,选择 Android 选项并检查 Android SDK Location 的目录是否正确.如果您已成功完成上述第 3 步,则应该是正确的.

In Eclipse's Preferences screen, select Android option and check that the directory of the Android SDK Location is correct. It should be correct if you have successfully completed step 3 above.

要创建一个新的 Android 项目,从 Eclipse 的菜单中选择 File |新 |Android 应用程序项目.在New Android Application屏幕中填写所需信息,完成后点击Finish.

To create a new Android project, from Eclipse's menu select File | New | Android Application Project. Fill in the required information in the New Android Application screen and click Finish when done.

可选:在 Eclipse 的 Window 菜单选项下,有两个 Android 子菜单选项:Android SDK Manager 和 Android Virtual Device Manager.

OPTIONAL: Under Eclipse's Window menu option, there are two Android submenu options: Android SDK Manager and Android Virtual Device Manager.

一个.Android SDK Manager 选项允许您安装/删除用于 Android 开发的版本和/或组件.

a. The Android SDK Manager option allows you to install/remove versions and/or components used for Android development.

b.Android 虚拟设备管理器 选项允许您创建用于开发和测试目的的虚拟 Android 设备.例如,TargetAndroid 2.1 - API 级别 7 的 Android 虚拟设备将允许您测试您的 Android 应用程序,该应用程序稍后将在设备(手机)上运行,平板电脑、笔记 - 运行 Android 固件版本 2.1.

b. The Android Virtual Device Manager option allows you to create virtual Android devices for development and testing purposes. For example, an Android virtual device with a Target of Android 2.1 - API Level 7 will allow you to test your Android application that will later run in production on devices - phones, tablets, notes - that run Android firmware version 2.1.