简体   繁体   English

Eclipse ADT-Android 4.2.2示例项目包含数百个错误

[英]Eclipse ADT - Android 4.2.2 sample project contain hundreds of errors

I'm a beginner in Android programming and trying to look at the sample projects, from the Eclipse ADT (v21.1.0) i'm choosing New Android Sample -> 4.2.2 -> and have 3 sample choices (Support4Demo,11Demo,...) each of them have 100+ errors 我在Android的编程初学者,想看看示例项目,从Eclipse ADT (v21.1.0)我选择新的Android样本- > 4.2.2 - >并有3种样本选择(Support4Demo,11Demo, ...)每个都有100多个错误

most errors are "cannot be resolved to type" errors and overriding errors 大多数错误是"cannot be resolved to type"错误和覆盖错误

what am i doing wrong? 我究竟做错了什么? I am using the latest eclipse and SDK (downloaded together) 我正在使用最新的Eclipse和SDK(一起下载)

Thanks :) 谢谢 :)

please check the version of SDK android which you work with it in the project , check the path of the SDK Android , and the version of the JDK . 请检查在项目中使用的SDK android的版本,检查SDK Android的路径以及JDK的版本。 just only these option . 仅这些选项。

good luck 祝好运

After searching i found that the latest revision (#12 from Feb 2013) of the Android Support Library doesn't contain some classes that it should have (FragmentTabHost, and a few more) 搜索后,我发现Android支持库的最新版本(2013年2月#12)不包含它应该具有的某些类(FragmentTabHost等)

tried to delete and download again, and again it didn't contain the classes it should, 尝试再次删除并下载,但又没有包含应有的类,

I found this link to the previous release (if you want a different release you can just change the number - 01,02...,09,10,11,12) 我发现此链接指向以前的发行版(如果您要使用其他发行版,则可以更改数字-01,02 ...,09,10,11,12)

http://dl.google.com/android/repository/support_r11.zip http://dl.google.com/android/repository/support_r11.zip

I replaced the support folder, copied the new (older) jar , and that solved all the problems. 我替换了support文件夹,复制了新的(较旧的)jar,这解决了所有问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM