4
votes

Eclipse Version: Helios Service Release 2 Build id: 20110301-1815

I have imported the ViewPagerIndicator library into Eclipse File->New->Android Project... Named project ViewPageIndicatorLibrary

Create project from existing source

Select source

C:\Android\development\workspace\Android-ViewPagerIndicator\library

Added compatibility library and Project builds correctly. Project properties 'Is Library' checked. Everything fine.

In the project I want to use ViewPageIndicator, select properties. Android Properties -> Add Library and the ViewPageIndicatorLibrary library project is available for selection.

Select the ViewPageIndicatorLibrary and it appears with green tick with a reference path of "C:\Android\development\workspace\ViewPageIndicatorLibrary" everything appears OK.

Close the properties, reopen properties and the Library reference appears with a red cross alongside.

The Reference path appears to be correct (points to same root of the ViewPageIndicatorLibrary project as just added)

"C:\Android\development\workspace\ViewPageIndicatorLibrary"

Project name displayed as '?'.

Eclipse seems to be losing the link to the ViewPageIndicatorLibrary project. Import references to com.viewpagerindicator.* fail to resolve.

project.properties of the main project shows

# Project target.
target=android-8
android.library.reference.1=C:/Android/development/workspace/ViewPageIndicatorLibrary

So the reference path is absolute and correct.Any ideas? I just want to get on and use this library, but it's not playing. Deleting/re-creating library project several times now - same results, Eclipse loses link when Properties dialog is close.

1

1 Answers

1
votes

I faced the same problem with google-play-services_lib. This problem occurred after I created a second eclipse workspace and copied some projects including that library.

In this situation, I had the google-play-services_lib in each workspace folder. I then deleted one folder, fixed the project setup (Android Tools) and cleaned the project in question. That solved the problem.

Might be an Eclipse bug (Juno 4.2.1).