Why suddenly I got the error "Unable to resolve target 'android-9' "?

17,685

Solution 1

Android 2.3, 2.3.1, 2.3.2 supports api 9. You are getting an error because you are using Android 2.1. Solution:- open AndroidManifest.xml file find and update line

<uses-sdk android:minSdkVersion="9" />

to as shown below,

   <uses-sdk android:minSdkVersion="7" />

This will definitely solve your problem.

Solution 2

Maybe the following link can help you?

http://sagistech.blogspot.com/2010/05/android-sdk-error-unable-to-resolve.html

Solution 3

In case anyone else comes across a similar problem, I had the error "Unable to resolve target 'android-9;" when importing the Google Play Services library as a project into Eclipse. The actual error results from not having the specified target installed on my computer.

The solution for me was to set the build target to the latest platform I had installed (in my case 19). This can be done either by modifying your project.properties file or by going into project->properties->android->Project Build Target.

You may also be able to set the target sdk version in the manifest by specifying:

<uses-sdk android:targetSdkVersion="19"/>

See: Unable to resolve target 'android-18' error

Share:
17,685
Mellon
Author by

Mellon

Software Engineer

Updated on June 07, 2022

Comments

  • Mellon
    Mellon almost 2 years

    I am developing android application (android-2.1-updated) under Ubuntu 10.04, with Eclipse IDE. I have successfully set up my working environment couple of weeks ago, and developing well (I can run my app on the connected device).

    But this morning, after I run ubuntu updates, then I restart my PC, then I start my eclipse, the eclipse console immediately throw an error message :

    AndroidAdaptiveUI Unable to resolve target 'android-9' .

    Very strange, everything is running fine before I restart my PC. But after the restart, I can not run my android app on my device.

    What does this error message means? What should I do to get rid from it?

    What I tried is to restart adb server by:

    adb kill-server
    
    adb start-server
    
    adb devices
    

    But, Then I got the following new error:

    [2011-07-18 14:28:32 - DeviceMonitor]Adb connection Error:EOF
    [2011-07-18 14:28:32 - DeviceMonitor]Connection attempts: 1
    [2011-07-18 14:28:33 - DeviceMonitor]Connection attempts: 2
    [2011-07-18 14:28:34 - DeviceMonitor]Connection attempts: 3
    

    Anybody can help me please?

  • Mellon
    Mellon almost 13 years
    @ scessor , based on the link you provided, the problem is that the platform SDK requested by the "AndroidManifest.xml" android:minSdkVersion is not installed. But how to install??? I go to eclipse Android SDK and AVD manager, select Available package, then? what is next?? I have installed SDK platform Android-2.1-updated before
  • scessor
    scessor almost 13 years
    Have you made the changes user609239 answered? That should solve your problem. More informations about the api levels you can see here.