如何解决 Titanium 错误“Ex...tion: No Android '-8' or android '-2.2' in the Android SDK."在运行 OSX Lion 的 Mac 上? [英] How to resolve Titanium error "Ex...tion: No Android '-8' or android '-2.2' in the Android SDK." on a Mac running OSX Lion?

查看:13
本文介绍了如何解决 Titanium 错误“Ex...tion: No Android '-8' or android '-2.2' in the Android SDK."在运行 OSX Lion 的 Mac 上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行 OSX Lion 的 mac 机器上使用 Titanium studio.

I am using Titanium studio on a mac machine running OSX Lion.

我在开发 iphone 和 ipad 应用程序时没有问题,但在为 Android 设置项目时遇到问题.

I have no problem developing iphone and ipad apps but having problem setting-up a project for Android.

我有一个现有的(最新的)android SDK,并且已经在标准 Eclipse 上使用 Java 开发基本应用程序.我尝试将 Titanium 指向我用于 Eclipse 的 android SDK,但由于以下异常而失败.

I have an existing (latest) android SDK and is already developing basic apps using Java on standard Eclipse. I tried pointing Titanium to my android SDK which I was using for my Eclipse but fails with the following exception.

指定路径中的 Android SDK 出现以下错误:Ex...tion: No Android '-8' or android '-2.2' in the Android SDK."

Android SDK at the given path has the following error:"Ex...tion: No Android '-8' or android '-2.2' in the Android SDK."

如何在不重新下载所有内容的情况下解决此问题?如果我要求 Titanium 为我设置 SDK,它会自动尝试.

How do I resolve this without re-downloading everything? Titanium automatically tries it if I ask it to set up my SDK for me.

推荐答案

该工具需要特定的最低 Android SDK 级别,而您的系统似乎缺少该级别.在终端中,打开 android 工具(在 android-sdk 文件夹中)以打开 Android SDK 管理器.下载 Android 2.2 (API 8) 工具:对于 API8,您至少需要SDK 平台"和Google Inc 的 Google APIs".在此期间,您可以下载您可能想要支持的任何较新的 SDK.

The tooling requires a specific minimum Android SDK level, which your system appears to be missing. In a terminal, open the android tool (in the android-sdk folder) to open the Android SDK Manager. Download the Android 2.2 (API 8) tools: you'll need at least the "SDK Platform" and "Google APIs by Google Inc" for API8. While you're at it, you can download any of the newer SDKs you might want to support.

确保您使用 SDK 的Google API"版本构建您的 Android 应用程序,否则您会遇到错误.非 API"SDK 不包含移动应用所需的各种 Google 组件.

Make sure you build your Android apps with the "Google APIs" version of the SDK or you'll get errors. The "non APIs" SDKs don't include the various Google components that mobile apps expect.

TiStudio 应该会提示您下载它,并且应该会为您打开 SDK 管理器.它不应该要求您重新下载所有内容.您可能需要运行它的检查以确保您安装了所有必要的组件.

TiStudio should prompt you to download this, and should open the SDK Manager for you. It shouldn't require you to re-download everything. You might want to run through its checks to make sure you have all the necessary components installed.

这篇关于如何解决 Titanium 错误“Ex...tion: No Android '-8' or android '-2.2' in the Android SDK."在运行 OSX Lion 的 Mac 上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆