相关疑难解决方法(0)

ActionBarSherlock - 无法解析android.support.v4.app.Fragment类型.它是从所需的.class文件间接引用的

我正在将ActionBarSherlock用作项目中的库项目,该项目本身就是一个库.在将项目移动到新计算机并更新SDK工具之前,一切正常.

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

import com.actionbarsherlock.app.SherlockFragment;

public class SomeFragment extends SherlockFragment {
    ... 
}
Run Code Online (Sandbox Code Playgroud)

我有以下编译错误:

The type android.support.v4.app.Fragment cannot be resolved. It is indirectly referenced from required .class files
Run Code Online (Sandbox Code Playgroud)

我检查了以下内容:

  • ActionBarSherlock作为库导入
  • 在构建路径(没有红叉)和actionbarsherlock.jar中没有明显的错误
  • 支持库位于ActionBarSherlock项目中,而不是其他依赖项目

还要别的吗?

android actionbarsherlock

45
推荐指数
4
解决办法
5万
查看次数

FragmentActivity无法解析为某种类型

我正在尝试从这个博客的应用程序.在扩展时FragmentActivity,我收到以下错误:

`FragmentActivity` was not able to resolve.
Run Code Online (Sandbox Code Playgroud)

我错过了任何图书馆还是其他什么?

我的代码:

public class Testing_newActivity extends FragmentActivity { // here the FragmentActivity getting error package not found for import
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.main);
        if (getResources().getConfiguration().orientation
                == Configuration.ORIENTATION_LANDSCAPE) {
            // If the screen is now in landscape mode, we can show the
            // dialog in-line so we don't need this activity.
            finish();
            return;
        }

        if (savedInstanceState == …
Run Code Online (Sandbox Code Playgroud)

android android-fragmentactivity

29
推荐指数
3
解决办法
5万
查看次数

Android项目抱怨"类型bolt.Task无法解析.它是从所需的.class文件间接引用的"

我正在尝试通过Parse Mealspotting教程,但在添加Parse库后,我得到了奇怪的错误.我在google搜索时发现了其他类似的错误,但没有任何效果.这是一个.我也看了看添加支持库,但是没有解决它.这是我在Eclipse中看到的

确切的文字是:

Multiple markers at this line - The type bolts.Task cannot be resolved. It is indirectly referenced from required .class files - The class file Task<?> contains a signature 'Ljava/util/Set<Lbolts/Task<*>.TaskCompletionSource;>;' ill-formed at position 30

我不关心支持库或应用程序将使用哪些设备,我想要的就是这个,所以我可以通过本教程.以前有人处理过这个吗?

我也尝试过创建一个只支持Kit Kat并删除了支持库的项目,但它仍然会抛出相同的错误.

android parse-platform android-support-library

7
推荐指数
1
解决办法
4762
查看次数