无法运行 Eclipse 项目 - 找不到 API 数据库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22875671/
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
Can't run Eclipse project - can't find API database
提问by F1sher
My code compiles. There is no errors in code. I downloaded full SDK. On run I get this error:
我的代码编译。代码中没有错误。我下载了完整的 SDK。在运行时,我收到此错误:
Can't find API database; API check not performed
And it's in Location: line 1, type Android Lint Problem.
它位于位置:第 1 行,输入 Android Lint Problem。
I have no idea whats wrong.
我不知道出了什么问题。
采纳答案by F1sher
I fixed it. In manifest I had in uses-sdk minSdkVersion specified but I didn't have targetSdkVersion. After addition of the targetSdkVersion parameter it compiled and ran.
我修好了它。在清单中,我指定了 uses-sdk minSdkVersion 但我没有 targetSdkVersion。添加 targetSdkVersion 参数后,它编译并运行。
回答by BartoszK
I have solved it differently. In manifest I had:
我以不同的方式解决了它。在清单中我有:
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
The problem was that after installation of new Eclipse ADT, in "Android SDK Manager" I didn't have any SDK Platform installed, so I have installed API 19 SDK Platform & Documentation & Sources.
问题是在安装新的 Eclipse ADT 后,在“Android SDK 管理器”中我没有安装任何 SDK 平台,所以我安装了 API 19 SDK 平台 & 文档 & 来源。
I would also install API 9, but for some reason it is missing in SDK Manager.
我也会安装 API 9,但由于某种原因它在 SDK 管理器中丢失。
Anyway, after this I have edited the android:minSdkVersion="10"
-> SAVE-> again changed to android:minSdkVersion="9"
-> SAVE
无论如何,在此之后我编辑了android:minSdkVersion="10"
-> SAVE-> again changed to android:minSdkVersion="9"
->SAVE
...and the problem was gone.
……问题就解决了。
回答by Sharky
- go to your
Manifest
- click on
Uses Sdk
- change
Min SDK version
to9
or something else and pressctrl+s
(save) - error should disappear now
- change
Min SDK version
back to your original value
- 去你的
Manifest
- 点击
Uses Sdk
- 更改
Min SDK version
为9
或其他内容并按ctrl+s
(保存) - 错误现在应该消失
- 变
Min SDK version
回原来的值
That solved it for me.
那为我解决了。
回答by Jake
In the Package Explorer, right click on the project displaying the Android Lint Problem. Then choose option Android tools- from that point choose Clear Lint Markers
在 Package Explorer 中,右键单击显示 Android Lint Problem 的项目。然后选择选项 Android 工具 - 从那时起选择 Clear Lint Markers
That should remove the error.
那应该消除错误。