How to import ViewPagerIndicator library in Eclips

2019-07-27 14:22发布

问题:

I referred this Link.

As they mentioned, I download it as a zip file and tried to import the library project into Eclipse, but I can't. Instead I get a message "No files to import". How to overcome this?

回答1:

Normally the problem is that you have an existing project called "library" in your workspace, you need to rename it and try to "import from existing code" again.

Another option is

  1. In the project root directory, run mvn eclipse:clean
  2. Then run mvn eclipse:eclipse to build .classpath and .project files

Hope it works.



回答2:

I don't think you can use the ViewPagerIndicator as a library in your project. You have import the ViewPagerIndicator as a project, and then reference it in your project.



回答3:

You can choose between two possibilities:

  1. Copy the library source folder into your android project source folder.

  2. If you won't the library as an own library project, follow these steps:

Package Explorer > New > Project ... > Choose "Android > Android Project from Existing Code" > Select unzipped Lib Folder