Facebook SDK + SlidingMenu SDK = Jar mismatch! Fix your dependencies - android

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.

Related

Found 2 versions of android-v4 jar in dependency list

hii
I have integrated facebook in android. and now when i click on the fb button i get this error.
Found 2 versions of android-support-v4.jar in the dependency list,
If you are adding more than one library project to your project, and these projects requires android support 4 library. then make sure that all of these projects use the same android support library (The newest). So, get the latest version of the library and copy it to the lib folder of your projects.
Try to delete the extra android-support-v4.jar library from libs folder.
Go to libs in project by going to windows explorer and delete the support file in libs.
Now go to workspace and open the appcompat folder copy the v4 file and paste in Yourprojectname>libs
Now goto eclipse and clean the project and restart eclipse
all errors will be gone.

Jar mismatch! Fix your dependencies when using appcompat_v7 and Facebook sdk.

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

Found 2 versions of android-support-v4.jar in the dependency list appcompat in android

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

Conflict in jar with multi-library project

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.

Eclipse - ACRA jar file not recognised

I'm trying to add ACRA to my project and I've followed these steps ACRA Basic Setup but Eclipse is not recognising the #ReportCrashes that it has you create with the class:
I made sure I created a "lib" folder and I added the jar file to it (by drag & drop from a windows explorer), I then right-clicked it and choose Add to Build Path. I even tried to remove the jar file and re-add it and do a Project --> Clean but still nothing.
Any ideas as to what I'm doing wrong?
Here's some screenshots of the Annotations from Eclipse:
I've had the same problem, and I think I've discovered the root of it: I was importing the jar inside SRC folder, instead of importing the one in BUILD folder. Just deleted the first one, reconfigured BUILDPATH to remove the wrong entry, did a clean, copied the right (BUILD FOLDER) jar into the libs folder in my project and then everything went OK
Maybe it helps?
OK I figured out the problem. I had the same issue as you and the problem for me was that I added the source jar and not the build jar from the ACRA archive. It now recognizes the classes from the jar. Rookie mistake :)
Robert,
I updated to R20 of the Android SDK Tools today (Aug 15, 2012) and also upgraded to Eclipse Juno and had similar problems with ACRA and my other jar files.
The way I understand it R17 change the build process that any jar in the '/libs' folder is automatically added to the build path. Which means if you had a jar in the '/libs' folder you need to remove it from you java build path or you get the dreaded "Dalvik 1" build error.
Next, I noticed there is no way to add source or javadoc to jars in the lib folder. So I moved all my jars to a second folder, in my case '/external/jar'. When I moved ACRA-4.2.3.jar to '/external/jar' my project would crash with the same error as yours. So I moved it back to '/libs' and it worked, although I could not add javadoc or source to the ACRA jar.
The conclusion is to place the ACRA jar file in the '/libs' folder. Other jar files may be placed in '/libs' or elsewhere. Also, update Android SDK and Eclipse.
Hope this helps you are somebody,
Fish

Categories

Resources