Using ActionBarSherlock & ViewPagerIndicator Synchronously Will Not Compile

后端 未结 2 971
眼角桃花
眼角桃花 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 15:54

    I'm on the latest version of ADT, SDK etc and it still has this problem - it still doesn't seem to know which support library to use from which dependent library etc.

    TJ's solution does work but I used an alternate approach.

    My solution was the following:

    1. Went into each library project and main application project that references the library and deleted the libs/android-support-v4.jar reference
    2. Went back into each project and dragged the android-support-v4.jar from the filesystem (on my Mac, I store the SDK in my documents folder: Users//Documents/Android/android-sdk-mac_x86/extras/android/compatibility/v4/android-support-v4.jar) onto the libs folder and choose to LINK to the jar instead of copying it into the project.
    3. Now all my projects reference the same .jar file on my filesystem and if I update the support library in the future (via the Android SDK Manager), the .jar will be updated and the projects in turn will pull in the latest jar.

    So updating the support library should not break anything and allow you to be on the latest version.

提交回复
热议问题