Google-play-services_lib 无法解析目标“android-9”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23174121/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Google-play-services_lib Unable to resolve target 'android-9
提问by ??? ?
When I start up my Android ADT most if not all of my projects have a red exclamation next to them. And when I try to build and run them I get an error:
当我启动我的 Android ADT 时,大多数(如果不是全部)项目旁边都有一个红色感叹号。当我尝试构建和运行它们时,我收到一个错误:
"google-play-services_lib] Unable to resolve target 'android-9'"
“ google-play-services_lib] 无法解析目标 'android-9'“
I am not sure what this means as I am up to date with my updates with my Android SDK manager.
我不确定这意味着什么,因为我正在更新我的 Android SDK 管理器。
I have tried restarting eclipse. I have tried downloading another Android SDK and running from there but still the same error.
我试过重新启动日食。我尝试下载另一个 Android SDK 并从那里运行,但仍然出现相同的错误。
Please help guide me into the right direction.
请帮助指导我走向正确的方向。
回答by neveroffline
Actually downloading the latest ADT bundle for Eclipse gives the same error when trying to import the google_play_services_lib (17). http://developer.android.com/sdk/index.html#download
实际上,在尝试导入 google_play_services_lib (17) 时,为 Eclipse 下载最新的 ADT 包会出现相同的错误。http://developer.android.com/sdk/index.html#download
Open the SDK Manager, click obsolete (so API 9 shows up), and grab API 9. This is really something that seems like a simple oversight and should be fixed. Hope this helps others.
打开 SDK 管理器,单击 obsolete(因此显示 API 9),然后获取 API 9。这确实是一个看似简单的疏忽,应该修复。希望这对其他人有帮助。
回答by Andrew
I had this problem show up after installing the latest updates using the ADT.
使用 ADT 安装最新更新后,出现此问题。
In eclipse I've got my project and a project for the google-play-services_lib.
在 Eclipse 中,我有我的项目和 google-play-services_lib 的项目。
I found that if you change the minimum sdk version (as said earlier) to greater than 9 it's not enough. I also had to change the "Project build target" (Properties/Android/) to match the version that I'd set in the manifest.
我发现如果您将最小 sdk 版本(如前所述)更改为大于 9,这还不够。我还必须更改“项目构建目标”(属性/Android/)以匹配我在清单中设置的版本。
回答by MrB
just check the 'Obsolete' on SDK manager then install missing (API 9)
只需检查 SDK 管理器上的“过时”,然后安装丢失的 (API 9)
回答by jsanmarb
I fixed the project properties setting the project build target:
我修复了设置项目构建目标的项目属性:
That works for me.
这对我行得通。
回答by Rod_Algonquin
its the mnimum sdk version in ur manifest its should be more than version 9
它是您清单中的最小 sdk 版本,它应该是版本 9 以上
回答by Jorgesys
Two options to fix this:
解决此问题的两个选项:
1) install Android 2.3.1 (API 9), but is currently obsolete.
1) 安装 Android 2.3.1 (API 9),但目前已过时。
2) Change into the AndroidManifest.xml to at least android:minSdkVersion="10"
2) 将 AndroidManifest.xml 改为至少 android:minSdkVersion="10"
回答by Shashidhar Mayannavar
Change android:minSdkVersion="9"to more than 9 in AndroidManifest.xml file
i.e., android:minSdkVersion="10"
By doing this i solved my problem
Hope this helps!!
在 AndroidManifest.xml 文件中将android:minSdkVersion="9"更改为 9以上,
即 android:minSdkVersion="10"
通过这样做我解决了我的问题
希望这有帮助!!
回答by venkat
This may occur while you update the ADT. It could be because of the google play service libraries out of sync files. Simply closing the library and importing again will solve the out of sync issue.
更新 ADT 时可能会发生这种情况。这可能是因为 google play 服务库文件不同步。只需关闭库并再次导入即可解决不同步问题。