ActionBarSherlock - android.support.v4.app.Fragment不能解析的类型。这是间接地从必需的.class文件中引用 [英] ActionBarSherlock - The type android.support.v4.app.Fragment cannot be resolved. It is indirectly referenced from required .class files

查看:152
本文介绍了ActionBarSherlock - android.support.v4.app.Fragment不能解析的类型。这是间接地从必需的.class文件中引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ActionBarSherlock作为一个项目,该项目是一个库本身就是一个库项目。 这是所有工作正常,直到我搬到这个项目到新计算机,并更新了SDK工具。

I am using ActionBarSherlock as a library project in a project which is a library itself. It was all working fine until I moved the project to a new computer and updated the SDK tools.

我有这样的错误,我不明白。当我创建一个类扩展SherlockFragment是这样的:

I have this error I don't understand. When I create a class extending SherlockFragment like this:

import com.actionbarsherlock.app.SherlockFragment;

public class SomeFragment extends SherlockFragment {
    ... 
}

我有以下的编译错误:

I have the following compilation error:

The type android.support.v4.app.Fragment cannot be resolved. It is indirectly referenced from required .class files

我已经检查以下内容:

I have checked the following:

  • ActionBarSherlock导入为库
  • 在构建路径(无红叉),并actionbarsherlock.jar没有明显的错误是present
  • 支持库是在ActionBarSherlock项目,并在其他项目视

还有别的吗?

推荐答案

我有同样的问题,因为你,因为我已经更新了SDK。 我已经这样做解决了我的问题,这(对日食):

I had the same problem as you since I had updated the SDK. I have solved my problem by doing this (on eclipse) :

  • 右键点击操作栏福尔摩斯库=> 属性 => Java构建路径 => 订单和出口设置页=>检查支持Android V4 Android的私人图书馆并选择确定
  • 右键点击您的个人项目,进入属性=> Java构建路径=> 检查Android的私人图书馆
  • 在清洁这两个项目,它应该工作。
  • Right click on the action bar sherlock library => Properties => Java Build Path => Order and Export tab => check android support v4 or Android Private Libraries and select Ok
  • Right click on your personal project and go to properties => java build path => check Android Private Libraries
  • Clean both projects, it should work.

这篇关于ActionBarSherlock - android.support.v4.app.Fragment不能解析的类型。这是间接地从必需的.class文件中引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆