Unable to resolve target 'android-8'

Hi folks. Trying to get an Android build working, and am getting an "unable to resolve target" message. The SDK's are all installed, and I've pointed my system to the right locations: [b]Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Mi…

Viewing 1 to 11 (11 Total)
Unable to resolve target 'android-8'

danhett

danhett
Total Posts: 21
Joined: February 11, 2012

Hi folks.

Trying to get an Android build working, and am getting an "unable to resolve target" message.

The SDK's are all installed, and I've pointed my system to the right locations:

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Dan>nme setup android
Download and install the Android SDK? [y/n/a] ? n
Download and install the Android NDK? [y/n/a] ? n
Download and install Apache Ant? [y/n/a] ? n
Download and install the Java JDK? [y/n/a] ? n

Path to Android SDK [C:\Development\Android SDK] :
Path to Android NDK [C:\Development\Android NDK] :
Path to Apache Ant [C:\Development\Apache Ant] :
Path to Java JDK [C:\Program Files\Java\jdk1.7.0_01] :

C:\Users\Dan>



But when I run the build in Flash Devlop, I get the following error message:


BUILD FAILED
C:\Development\Android SDK\tools\ant\build.xml:440: Unable to resolve target 'android-8'

Total time: 3 seconds
Build halted with errors (haxelib.exe).


Any ideas?

Tags:
Posted on February 21, 2012 at 3:58 PM

danhett

danhett
Total Posts: 21
Joined: February 11, 2012

Re: Unable to resolve target 'android-8'

Uh, so this is a screengrab of my SDK manager.

http://i.imgur.com/yKQIm.png

If it's looking for Android-8, why? Does the 8 refer to API versions? And if so, why would it be looking for 8 when the list goes up to 15?

Where does the 8 come from?

Posted on February 21, 2012 at 4:13 PM

aaulia

aaulia
Total Posts: 49
Joined: November 7, 2011

Re: Unable to resolve target 'android-8'

You need to install SDK 8 (android 2.2). Because each platform version is not inclusive.CMIIW, even if you have android-15 installed, it doesn't mean it include all platform from 1-15

Posted on February 21, 2012 at 4:44 PM

danhett

danhett
Total Posts: 21
Joined: February 11, 2012

Re: Unable to resolve target 'android-8'

Yep, figured it out and forgot to post back.

So is SDK 8 like a stable base version that NME exclusively uses or something? I've never worked with Android so I'm still trying to figure out how it all works!

Posted on February 22, 2012 at 1:54 PM

singmajesty

singmajesty
Total Posts: 2819
Joined: August 25, 2011

Re: Unable to resolve target 'android-8'

Android uses different "API levels" depending on the minimum version of Android OS you are targeting.

NME is designed to support Android 2.1 or greater, which is actually API 7. However, in order to enable installation on the SD card, there is an extra property that is available in API 8 which is backward compatible with 2.1 devices (API 8 is for 2.2 devices)

Theoretically it may be possible to always use the latest API for old devices, but I have a feeling that could lead to trouble.

Posted on February 22, 2012 at 3:10 PM

danhett

danhett
Total Posts: 21
Joined: February 11, 2012

Re: Unable to resolve target 'android-8'

That makes sense.

Is there a best practice on this kind of thing? Like, a recommended way of doing things?

Posted on February 22, 2012 at 3:15 PM

singmajesty

singmajesty
Total Posts: 2819
Joined: August 25, 2011

Re: Unable to resolve target 'android-8'

Well, it shouldn't be something you have to think about, much. When you run "nme setup android" it will prompt you to install "SDK Platform-tools" and "API 8" from the Android SDK manager. When you have your dependencies set up, NME should just work automatically for you smiling

Posted on February 22, 2012 at 3:19 PM

danhett

danhett
Total Posts: 21
Joined: February 11, 2012

Re: Unable to resolve target 'android-8'

Neat!

It's up and running perfectly now anyway, I was just curious. I'm currently really trying to pitch NME as a viable technology internally at the agency I work for, so I'm making sure my bases are covered!

Thanks for the help smiling

Posted on February 22, 2012 at 3:24 PM

madrazoman

madrazoman
Total Posts: 63
Joined: May 10, 2012

Re: Unable to resolve target 'android-8'

I had to manually select Android (API8) in the Android SDK Manager.

Posted on May 10, 2012 at 4:49 PM

tanzeelrana

tanzeelrana
Total Posts: 1
Joined: June 17, 2013

Re: Unable to resolve target 'android-8'

hi guys just a quick question

how can I install android 2.2 api 8 through the command port ? Im using ubuntu and have looked over the internet but could not find a way to do it through the command port....... I cannot install the api via sdk manager because I have to install it on my companys server where I have jenkins installed which has to build my project.

Posted on June 17, 2013 at 7:40 AM

singmajesty

singmajesty
Total Posts: 2819
Joined: August 25, 2011

Re: Unable to resolve target 'android-8'

Does any of this help?

http://stackoverflow.com/questions/10941549/install-android-sdk-usi...

Posted on June 17, 2013 at 12:01 PM