简体   繁体   English

SherlockActivity无法解析为android中的类型

[英]SherlockActivity cannot be resolved to a type in android

Hi i have to develop android BBc news reader application from BBC NEWS READER 嗨,我必须从BBC新闻阅读器开发android BBc新闻阅读器应用程序

Here i have to import these app from above link and run the app means i get the following error.how can i resolve these error ??? 在这里我必须从上面的链接导入这些应用程序并运行该应用程序意味着我收到以下错误。我该如何解决这些错误? please help me 请帮我

The error is : 错误是:

SherlockActivity cannot be resolved to a type...i got the error on below line... SherlockActivity无法解析为类型...我在下面的行上看到错误...

public class WidgetConfigActivity extends SherlockActivity {
ListView listView;

I have added library file also. 我还添加了库文件。

  • Download ActionBarSherlock from here . 此处下载ActionBarSherlock。
  • Unzip the downloaded file and import the project to Eclipse. 解压缩下载的文件并将项目导入Eclipse。
  • Right-click on your project -> Properties 右键单击您的项目->属性
  • In Android->Library section click Add 在Android->库部分中,单击添加
  • If you added the ActionBarSherlock library correctly you can find it there. 如果正确添加了ActionBarSherlock库,则可以在其中找到它。
  • Add it your project 将其添加到您的项目

Checkout this documentation on how to reference a library project in eclipse. 查阅此文档 ,了解如何在Eclipse中引用库项目。

EDIT: 编辑:

To remove the android-support-library dependancy error, remove the android-support-v4.jar file present in the libs section of your project. 要删除android-support-library依赖性错误,请删除项目的libs部分中存在的android-support-v4.jar文件。

The reason for the error is that ActionBarSherlock already has an android-support-v4.jar along with the library. 发生错误的原因是ActionBarSherlock与库一起已经有了android-support-v4.jar So there arises a conflict between the two files 因此,这两个文件之间发生冲突

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

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