Unable to resolve target 'android-8'

Compiling to android worked (android-7), but I recently got a message that hxcpp had to be updated, which I have done. Now I'm getting this error, but I do have Android 2.2 API 8 installed. BUILD FAILED C:\SDKs\android-sdk-windows\tools\ant\buil…

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

Wiering

Wiering
Total Posts: 41
Joined: October 27, 2011

Compiling to android worked (android-7), but I recently got a message that hxcpp had to be updated, which I have done.

Now I'm getting this error, but I do have Android 2.2 API 8 installed.


BUILD FAILED
C:\SDKs\android-sdk-windows\tools\ant\build.xml:421: Unable to resolve target 'android-8'

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

Tags:
Posted on January 02, 2012 at 3:25 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Unable to resolve target 'android-8'

It sounds like you are working from the development builds?

Make sure that everything is up-to-date... HXCPP 2.08 or newer, update to the latest SVN revision of NME, make sure your binaries have been compiled and the command-line tools (run.n) for NME.

You might also need to remove the build directory to perform a clean build. Double-check and make sure that the 2.2 SDK Platform is all installed, as well as the Android SDK Tools.

Posted on January 02, 2012 at 3:29 PM

Wiering

Wiering
Total Posts: 41
Joined: October 27, 2011

Re: Unable to resolve target 'android-8'

Thanks singmajesty, it turned out that I at some point had made a copy of the android SDK in c:\sdks and that one didn't have android-8.

Posted on January 02, 2012 at 6:17 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Unable to resolve target 'android-8'

Oh!

Glad to hear it wasn't anything more scary smiling

Posted on January 02, 2012 at 6:25 PM

emrahsifoglu

emrahsifoglu
Total Posts: 4
Joined: May 28, 2012

Re: Unable to resolve target 'android-8'

Hello,

I have same issue. HXCPP 2.09 is already installed.

"andorid-8.xml" is found in "C:\Development\ANDROID_SDK\tools\proguard\examples\ant".

I guess everything seems ok however I got following result.

-set-mode-check:
-set-debug-files:
-set-debug-mode:
-debug-obfuscation-check:
-setup:
[echo] Creating output directories if needed...
[echo] Gathering info for Output...
[setup] Android SDK Tools Revision 19

BUILD FAILED
C:\Development\ANDROID_SDK\tools\ant\build.xml:470: Unable to resolve target 'android-8'

Total time: 0 seconds
Build succeeded
Done(0)
Running process: C:\Motion-Twin\haxe\haxelib.exe run nme run "C:\Documents and Settings\Computer\My Documents\FDProjects\Test_NME\application.nmml" android -debug -Dfdb
can't find 'C:\Documents and Settings\Computer\My Documents\FDProjects\Test_NME\bin/android/bin/bin/Output-debug.apk' to install
Done(1)

What could problem be?

Posted on May 31, 2012 at 8:10 AM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Unable to resolve target 'android-8'

Could you open the Android SDK Manager, and make sure that the "Android SDK Platform-tools" and "Android API 8" packages are installed?

Posted on May 31, 2012 at 9:55 AM

dbuzz

dbuzz
Total Posts: 4
Joined: June 19, 2012

Re: Re: Unable to resolve target 'android-8'

Go to your nme templates folder. Mine is in this location:
C:\app\sdks\nme\3.3.3\haxe\lib\nme\3,3,3\tools\command-line\android\template
Change build.xml and default.properties files to some higher Android SDK level. like target-10, depending on what is installed on your system.
Re-run haxelib run nme test ... again.

Posted on June 19, 2012 at 11:43 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Unable to resolve target 'android-8'

Is there a risk in using newer SDK versions to compile only for older versions of Android?

Posted on June 20, 2012 at 12:06 AM

dbuzz

dbuzz
Total Posts: 4
Joined: June 19, 2012

Re: Unable to resolve target 'android-8'

smiling Yeah, perhaps there is a risk especially if NME distribution has been tested to work against android-8 only. Which I assume is the case, since level-8 is hard coded into template builds. So, better workaround is to actually install level 8 SDK. On the other side if someone is writing an extension which uses features only available on latest SDKs, then it's up to him to verify that everything works fine.

Posted on June 20, 2012 at 9:57 PM