My project include some library project. An error is popped up.
"All versions of the libraries must be the same at this time."
I find that these library project use android-support-v4.jar.
Anyone know how to solve it?
Thanks.
Please go to libs folder of your main project and copy / replace the android-support-v4.jar file to the libs folder of all attached to your project libraries projects. It should solve the library conflict issue.
Related
I am using appcompat_v7 library and facebook sdk in my project and both the library have android-support-v4.jar.If I delete any of the jar the corresponding library is not working and having both jars is not allowed.
What should I do? Kindly help me out...
The conflict is due to different versions of the jar.
Make sure you have the update support library from the android sdk manager
Copy android-support-v4.jar to libs of both the projects. The jar can be found #
android-sdk/extras/android/support/v4/andorid-support-v4.jar
Clean and build your project
remove android-support-v4.jar from FACEBOOK SDK and add android-support-v4.jar as external jar facebookSDK properties -> java build path -> libraries -> add external jar (i had remove this problem like this )
Try removing the dependency library from both appcompat_v7 and your project. To do that got to build path=>configure build path. Then select the dependency library and click on remove.
Add the support library by Android Tools=>add support library.
Do this to both projects.Then you are good to go
Its really simple
Just right click on your project as well as on the library project >android tools >Add support Library.
This will update your support library to the latest which solves the problem.
This question is ask many times while everyone are start-up android development in learning stage.
I think everyone has same environment of android but they configure differently according to projects.
I had same issue while creating new project every time and i found solution on below.
I added library appcompat_v7 into project and remove jar android-support-v4.jar from lib folder of my new project and blink ERROR was gone.
Add appcompt_v7 library project
Remove android-support-v4.jar from project lib folder
Wow error was gone
Best way to fix this issue is to look out for both jar files path. If you have "appcompact folder" in your eclipse then look into libs folder. In libs folder you have jar files.So, It's better to remove jar files from your application folder. Then at the time of compilation it will take jars from "appcompact folder".Don't keep jars in your app folder which leads to "Jar mismatching error". Error is mentioned below:
Found 2 versions of android-support-v4.jar in the dependency list,All versions of the libraries must be the same at this time.
Path: /home/vinny/workspace/appcompat_v7/libs/android-support-v4.jar (Keep this jar as it is)
Path: /home/vinny/Downloads/Demo/libs/android-support-v4.jar(Remove this Jar )
Jar mismatch! Fix your dependencies
Note : Remove jars from this path "Path: /home/vinny/Downloads/Demo/libs/android-support-v4.jar" T(Application's folder path)
Safdar Akrami is right, but also to do it on facebook SDK project!
Just right click on your project as well as on the library project >android tools >Add support Library.
This will update your support library to the latest which solves the problem.
if you have problem with the other projects that depends of facebook SDK project, you can fixed in this way:
Fix Project Setup
Add project "appcompat_v7" to build path of FriendpickerSample for example
Try removing the dependency library from both appcompat_v7 and your project. To do that got to build path=>configure build path. Then select the dependency library and click on remove. Add the support library by Android Tools=>add support library. Do this to both projects.Then you are good to go
When I add appcompat project as a library I get these errors:
- found 2 versions of android-support-v4.jar in the dependency list appcompat in android.
- `aapt.exe` has stop working.
How to solve this?
Delete android-support-v4.jar from library and project. Then go in <sdk>/extras/android/support/samples/Support4Demos/ and copy android-support-v4.jar and paste in libs folder of both.
Generally you get this error when you add external library which already contains android-support-v4.jarfile.
Here you can delete this android-support-v4.jar file from your libs folder. This will solve your problem.
I too had same problem just few day's back and what i did is, just deleted the android-support-v4.jar from my project, and then i have added my library project jar by right clicking my project -> go to properties, select java Build Path and then select add external jar from the option and select android-support-v4.jar from your library project and then click on Order and export and check mark android-support-v4.jar that you have added from library project and then press Ok.
That's it. Enjoy Coding
So I have added the Facebook SDK and the SlidingMenu SDK into my Android project, however I am getting those nasty "Jar mismatch" errors.
I have already removed the android-support-v4.jar file from my libs folder, yet the error persists.
Any ideas on how to fix this?
(I have also tried deleting the files from the folders, but I get the 'file not found' errors)
Image: http://i.stack.imgur.com/9JOvg.png
Delete the android-support-v4.jar from the SlidingMenu library. And copy the android-support-v4.jar file from the Facebook SDK's libs folder and paste it in to your SlidingMenu's libs folder.
And then refresh the SlidingMenu project and finally clean all projects after doing the above.
Remove the support library from both library projects and re-add it to your project.
Try using the remove the android-support-v4.jar file from the libs folder from your project.
Good Luck.
how to resolve issue of jar mismatch i need to use both libraries ?
i am working on integrating ViewPagerExtensions.jar in my project library available from https://github.com/astuetz/ViewPagerExtensions
any help or advice would be greatly appreciated
This error means you have two different versions of the android-support-v4.jar, one in your project and one in the ViewPagerExtensions library.
Simply replace one or both jars by the most recent android-support-v4.jar.
just copy one .jar from one of the libs folders and put it on the other librarys libs folder. So that both libraries use the same version of the support library.
This is a more elegant fix than deleting and adding files!
You just need to :
Right Click the project App Free
Go To "Android Tools" > "Add Support Library"
Approve the permissions and let it update the library
Repeat this process for the project App Library
The Android Support Library will then be in sync (:
I would like to import 2 existing projects as libraries in Eclipse.
Both library projects depends on the support-library-v4 and have a .jar file.
So when I import them I am asked to fix the dependencies. I get this error:
Jar mismatch! Fix your dependencies
How to fix that?
Try this:
Right click your Project Preferences of your Library.
Click Java Build Path
Remove the android-support-v4 jar you see in the "root"
This is a very common error that can occur if you are using the same library of different builds in two or more projects. The best way to solve this is to right click on all your projects and reinstall your android support library.
NB: Remember to use the library source files