com.viewpagerindicator android.view.view

时间:2014-10-02 07:59:55

标签: android viewpagerindicator

我试图在项目中使用JakeWharton-Android-ViewPagerIndicator。 http://viewpagerindicator.com/

我解压缩了JakeWharton-Android-ViewPagerIndicator并在此文件夹中启动了一个新项目。 在文件UnderlinePageIndicator.java中我有一个错误:

import android.view.View;
...
public class UnderlinePageIndicator extends View implements PageIndicator { ... }

错误:视图无法解析为某种类型。 我在第1行也有错误(这是评论),说: 无法解析android.view.ViewGroup类型。它是从所需的.class文件

间接引用的

错误日志:

Description Resource    Path    Location    Type
The project was not built since its build path is incomplete. Cannot find the class file for android.view.ViewGroup. Fix the build path then try building this project  JakeWharton-Android-ViewPagerIndicator-8cd549f      Unknown Java Problem

Description Resource    Path    Location    Type
The type android.view.ViewGroup cannot be resolved. It is indirectly referenced from required .class files  UnderlinePageIndicator.java /JakeWharton-Android-ViewPagerIndicator-8cd549f/library/src/com/viewpagerindicator  line 1  Java Problem

我花了好几个小时才解决这个问题。欢迎任何帮助。 感谢。

1 个答案:

答案 0 :(得分:5)

  1. 导入 JakeWharton-Android-ViewPagerIndicator导入您的工作区,然后打开project->properties->android->library(scroll_down)->Add button对话框中的右键单击,然后选择{{1}然后点击应用/确定

  2. 然后点击此链接“Adapter for circle page indicator in android”。我已经将CirclePageIndicator与viewpager一起使用。它绝对会帮助你:)