开发者

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

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开发者_StackOverflow 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?


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.


Maybe the following link can help you?

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


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


I resolved the problem by doing this: right click on the project, select Android, in the Project Build Target check on Google APIs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜