Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Error after creating the Blogg reader app. and i have no idea what it means.

These are the errors i got in the console.

2014-09-19 09:09:50 - MasterDetailExample] Found 2 versions of android-support-v4.jar in the dependency list, [2014-09-19 09:09:50 - MasterDetailExample] but not all the versions are identical (check is based on SHA-1 only at this time). [2014-09-19 09:09:50 - MasterDetailExample] All versions of the libraries must be the same at this time. [2014-09-19 09:09:50 - MasterDetailExample] Versions found are: [2014-09-19 09:09:50 - MasterDetailExample] Path: C:\Users\CMS - BiTiSi\workspace\MasterDetailExample\libs\android-support-v4.jar [2014-09-19 09:09:50 - MasterDetailExample] Length: 758727 [2014-09-19 09:09:50 - MasterDetailExample] SHA-1: efec67655f6db90757faa37201efcee2a9ec3507 [2014-09-19 09:09:50 - MasterDetailExample] Path: C:\Users\CMS - BiTiSi\workspace\appcompat_v7\libs\android-support-v4.jar [2014-09-19 09:09:50 - MasterDetailExample] Length: 648327 [2014-09-19 09:09:50 - MasterDetailExample] SHA-1: ded9acc6a9792b8f1afc470f0c9cd36d178914cd [2014-09-19 09:09:50 - MasterDetailExample] Jar mismatch! Fix your dependencies

any ideas??

2 Answers

Yes, I had this issue previously, too. It's a simple fix though! In your libs directory, delete one version of android-support-v4.jar, it doesn't matter which one as long as you're not going be deleting any of the below paths:

  • C:\Users\CMS - BiTiSi\workspace\MasterDetailExample\libs\android-support-v4.jar
  • C:\Users\CMS - BiTiSi\workspace\appcompat_v7\libs\android-support-v4.jar

Anyhow, I will also explain the issue for you so you understand what actually went wrong (An answer is useless if you don't know why it happened).

So, Java is just complaining here because you have 2 versions of android-support-v4.jar in the same project which it does not like! They will both be the same file but, they are added into your project from different locations and, Java does not understand which one it should use.

Also, if you were wondering why you even have that library in the first place, it's because android uses support libraries so that older devices can run newer features.

Hey, thx it really helped and I understand what happened and why. I will make some notes of this for future references.

Thank you again. :)