1

I'm trying to use Android PagerSlidingTabStrip v1.0.1library

in my project but, after I import the project as existing code in work space I get to project the Mainactivity and library and and the library is a dependency to the Mainactivity

but it seems that library project doesn't recognized as local library

so what i did is

1- I tried to make a jar file called library.jar from the library project and I imported as a external jar so that fixed my import but when I try to use PagerSlidingTabStrip object it says missing reference and beside that there is res folder couldn't be loaded .

2- I follow this How to add a Library Project to a android project and I did like what the accepted answer said but it still didn't work for me .

This is how I added the library project adding library project

That what I got in project libraries missing jar from bin folder in the library

I tried to use this dependency in build.gradle

dependencies {
    compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
}

but it didn't work

i added before sherlock to eclipse so when i added it inside the root folder a bin folder created and inside it there are a jar file and that's doesn't happen with library so i think here is the problem

any help?

Community
  • 1
  • 1
Antwan
  • 3,837
  • 9
  • 41
  • 62

3 Answers3

0

From properties window select option android scroll down, below library heading click the add button and select library project.

Pr38y
  • 1,565
  • 13
  • 21
0

I was facing the same issue but soon i came to know that there was support library missing from Library project.

Add support library and clean build the library project and then add it in your project

Yousef khan
  • 2,764
  • 3
  • 14
  • 16
0

Do the following:

  1. File->New->Other
  2. Select Android Project
  3. Select "Create Project from existing source"
  4. Click "Browse..." button and navigate to "PagerSlidingTabStrip-master" folder which you have downloaded from https://github.com/astuetz/PagerSlidingTabStrip
  5. Check "library"! (Uncheck "sample"). Make sure "Copy to Workspace" is checked as well.
  6. Click Finish. Now "library" is project in your workspace.
  7. Right-click on your project -> Properties
  8. In Android -> Library section, click "Add"
  9. Select recently added "library" project, click Ok and you're all set.