0

I am trying to use Jake Wharton's ViewPagerIndicator library. I have created a new library project for it. When I try to add it to Eclipse under <ProjectProperties> -> Android -> Add it gives me a green check mark. When I click out of the menu and then go back, the library reference is gone.

When I then go to my Java Build Path, I see "library" under Order and Export and Projects. I've read that it is bad to see if under Projects from this SO post: Could not find Library.apk!

I am also getting the error Could not find library.apk! from that SO question. I have tried removing the library in Projects, but that just causes my imports to mess up.

After removing it from Projects and hovering over the Eclipse error and then selecting Fix project setup it recommends Add project "library" to <my app>'s Build Path. This just brings me back to square one.

I have also tried this SO solution: ViewPagerIndicator

That didn't change anything within my project. I still get the Could not find library.apk! error. When I get my app to run and compile, it gives me this error:

Caused by: java.lang.ClassNotFoundException: com.viewpagerindicator.UnderlinePageIndicator

Which I assume is just because my project settings are so messed up. Any idea how to finally solve this? I've been trying different things out for hours...

Community
  • 1
  • 1
telkins
  • 10,440
  • 8
  • 52
  • 79

1 Answers1

1

Project Properties -> Java Build Path -> Project. Remove library.apk.

Report Error
  • 414
  • 2
  • 5
  • There is no library.apk there. Only the library folder. – telkins Jul 24 '12 at 17:37
  • And more. The path should be relative to the library. Check file "project.properties" android.library.reference.1 =../library-folder – Report Error Jul 24 '12 at 17:44
  • Ok I removed it again. "project.properties" only shows `target=android-15`. Am I supposed to add the line you mentioned? – telkins Jul 24 '12 at 17:49
  • 1. You should keep an open project "ViewPagerIndicator-library". 2.Open properties project "ViewPagerIndicator-library" -> Android. And set "is Library" 3.Open properties of your project -> Android -> Add library. Okay to get. – Report Error Jul 24 '12 at 18:03
  • I have the library project open alongside my normal Android project. I double checked that "is Library" is checked. I can add it to my project fine by going to "Add library" and it gives me a green check mark. But as soon as I click Apply and then OK, if I go back to that screen the library reference is gone... – telkins Jul 24 '12 at 18:07
  • I fixed the problem! The problem was that my version control program messed up the "readonly" settings on the files in my project folder. I just selected all the files and made sure they weren't read only. That was why Eclipse wouldn't add my library. Thanks for the help. – telkins Jul 24 '12 at 18:10