androidtitaniumappcelerator

How to resolve Titanium error "Ex...tion: No Android '-8' or android '-2.2' in the Android SDK." on a Mac running OSX Lion?


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

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

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 at the given path has the following error:"Ex...tion: No Android '-8' or android '-2.2' in the Android 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.


Solution

  • 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.

    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 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.