Jar mismatch! Fix your dependencies

后端 未结 10 1836
借酒劲吻你
借酒劲吻你 2020-11-27 11:32

Steps to reproduce:

  1. create a android project \"MyApp\"
  2. import ActionBarSherlock(ABS),Directional ViewPager(DVP), or any other open source library wh
相关标签:
10条回答
  • 2020-11-27 12:23

    Right click on your project -> Android Tool -> Add support library

    0 讨论(0)
  • 2020-11-27 12:26

    Use a Library Project just for the Support Library

    As of ADT 22, using Eclipse Juno

    I don't think any of the above are really the best answers. I also don't think it is recommended to use the external jar function in Eclipse anymore (AFAIK).

    Rather, what worked for me is to create a separate empty library project.

    Then use Android tools > Add Support Library to get the latest version you need or want.

    Then remove the support lib jar from all other projects.

    Finally, for every project that requires it, add a reference to your new Library project

    (project properties) > Android > (Library box) > Add...

    Then all your projects will have a single source to use and update the support library. This also makes javadocs easier to get working.

    For info on how to setup the javadocs see:

    How to attach javadoc or sources to jars in libs folder?

    0 讨论(0)
  • 2020-11-27 12:27

    Remove android-support-v4.jar file from the libs folder from your project.

    0 讨论(0)
  • 2020-11-27 12:29

    I agree with pjco. The best way is the official method explained in Support Library Setup in the tutorial at developer.android.com.

    Then, in the Eclipse "package explorer", expand your main project and delete android-support-v4.jar from the "libs" folder (as Pratik Butani suggested).

    This worked for me.

    0 讨论(0)
提交回复
热议问题