Using ActionBarSherlock & ViewPagerIndicator Synchronously Will Not Compile

后端 未结 2 982
眼角桃花
眼角桃花 2021-01-05 15:30

When using ActionBarSherlock and ViewPagerIndicator at the same time I am getting the below error; from what I\'ve read - it\'s caused due to conflicting/duplicate libraries

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-05 16:10

    Yes, the problem is both ActionBarSherlock and ViewPagerIndicator use libs/android-support-v4.jar dependency.

    The simplest solution is upgrade your work station to latest Android SDK and Eclipse ADT plugin version (at least r17), as this situation is automatically handled by the SDK now (since r17), see the r17 changelog:

    Dependency resolution

    When a project references two Library projects that both require the same jar file, the build system has to detect and resolve the duplication.

    Also Note that since r17, all jar file under libs folder are automatically populated to project's classpath, you don't need manually add them to project's build path anymore, also mentioned in the r17 changelog:

    Projects have source folders, as well as Library Project and jar file dependencies. With no other setup needed than adding Library Projects as a dependency in project.properties, a project’s classpath is automatically populated with:

    • The content of the project’s libs/*.jar
    • The output of the Library Projects.
    • The Library Projects’ libs/*.jar

    Hope this helps.

提交回复
热议问题