Question

I am a newbie to android. the question maybe silly for you, so forgive me. Now i am receiving an android project and open it in ADT.

When open the project there are two errors in two java files, which is the import com.viewpagerindicator cannot be resolved in the Problems. I have searched with google and find it's using ViewPagerIndicator. and also the jar name is android-support-v4.jar. I checked the project libs folder there is android-support-v4.jar and it's also in the Android Private Libraries.

I thought maybe it's not configured in the build path. so i checked the Java Build Path tab in the project Properties window, it's also in the Libraries tab. screenshot is as below: enter image description here

Am i missing anything? Any help would be appreciated.

Was it helpful?

Solution

You need to include the project as an Android library project, it seems you haven't done this.

From the "Including In Your Project" section

Android-ViewPagerIndicator is presented as an Android library project. A standalone JAR is not possible due to the theming capabilities offered by the indicator widgets.

You can include this project by referencing it as a library project in Eclipse or ant.

  1. Download all the source of the project, save it somewhere on your PC.
  2. In Eclipse click File/Import/Existing Android Code into Workspace and choose this folder.
  3. In your project click Project Properties/Android and in the Library section choose this project.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top