1

I know this has been asked like a hundred times but the solutions aren't working for me. I want to import PagerSlidingTabStrip into my project. I am running Android Studio 0.3.7. I have tried adding it through the project structure and manually adding the files and editing the build.gradle. Both times it gave me the same error :

A problem occurred evaluating project ':test'. Project with path ':libraries:PagerSlidingTabStrip:PagerSlidingTabStrip' could not be found in project ':test'.

Since both times it gave me the same error I feel it has something to do with the library itself. How do I fix this?

Chris
  • 141
  • 10
  • I think you don't have to manually add files to `build.gradle` anymore, or at least you shouldn't. They claim that `"Add Library As..." on .jar files now works for Gradle projects; it adds in a proper dependency in the build.gradle file` - http://tools.android.com/recent/androidstudio037released – Konrad Morawski Dec 10 '13 at 10:09
  • By the way, have you seen my question? (I asked it before AS 0.3.7 was available). Perhaps it could be of some help. http://stackoverflow.com/questions/19234698/how-do-i-add-guava-to-my-android-studio-project – Konrad Morawski Dec 10 '13 at 10:10
  • I don't have a .jar file though. Just the source for the project. – Chris Dec 10 '13 at 10:50

2 Answers2

1

Oh! Also I was struggled into while several days. I solve this problem and solve it by using this way.

please follow this guide line. How to import external library in android studio?

after finish your steps, just go to PagerSlidingTapStrip module -> src -> AndroidMenifest.xml

then just add 1 line

then all of things go well. If you have other question, commnet here.

Community
  • 1
  • 1
JungHoon
  • 302
  • 1
  • 4
  • 17
0

Ok I fixed it! Or did I.. I am really unsure as to what is going on here but I will explain what I did anyway... Just in case someone else going through this.

So when I went to add my library in project structure this is what I saw (ignore the error for now, you shouldn't see it): My project structure page

This is not what you should be seeing. Anyway I tried adding in dependencies but it did not work. It would just create a folder inside my project but not do anything with it. I couldn't find anywhere to delete that folder so I went and did it manually through explorer. After I came back and tried to make it gave me an error saying it couldn't find the folder I deleted. I restarted Android Studio and went back in to Android Structure to be greeted with a very similar error (instead it was saying it couldn't find the folder). I clicked on the go to source and it took me to the ACTUAL project structure page:

Actual project structure page

I feel like I might have done something stupid to cause this but I can't get back into those settings again... but on the bright side my library is added.

Chris
  • 141
  • 10