{"id":7389,"date":"2014-06-10T08:43:16","date_gmt":"2014-06-10T08:43:16","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/10\/jar-mismatch-fix-your-dependencies-collection-of-common-programming-errors\/"},"modified":"2014-06-10T08:43:16","modified_gmt":"2014-06-10T08:43:16","slug":"jar-mismatch-fix-your-dependencies-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/10\/jar-mismatch-fix-your-dependencies-collection-of-common-programming-errors\/","title":{"rendered":"Jar mismatch! Fix your dependencies-Collection of common programming errors"},"content":{"rendered":"<p>Steps to reproduce:<\/p>\n<ol>\n<li>create a android project &#8220;MyApp&#8221;<\/li>\n<li>import ActionBarSherlock(ABS),Directional ViewPager(DVP), or any other open source library.<\/li>\n<li>Add the libraries to the project &#8220;MyApp&#8221;<\/li>\n<\/ol>\n<blockquote>\n<p>Console log:<\/p>\n<\/blockquote>\n<pre><code>[2013-04-17 14:27:12 - MyApp] Found 2 versions of android-support-v4.jar in the dependency list,\n[2013-04-17 14:27:12 - MyApp] but not all the versions are identical (check is based on SHA-1 only at this time).\n[2013-04-17 14:27:12 - MyApp] All versions of the libraries must be the same at this time.\n[2013-04-17 14:27:12 - MyApp] Versions found are:\n[2013-04-17 14:27:12 - MyApp] Path: C:\\Users\\santhosh\\My_Workspace\\DVP_library\\libs\\android-support-v4.jar\n[2013-04-17 14:27:12 - MyApp]   Length: 140011\n[2013-04-17 14:27:12 - MyApp]   SHA-1: fc834ac8147bc4ed0b555f90f500a57d4232c448\n[2013-04-17 14:27:12 - MyApp] Path: C:\\Users\\santhosh\\My_Workspace\\abs_library\\libs\\android-support-v4.jar\n[2013-04-17 14:27:12 - MyApp]   Length: 271754\n[2013-04-17 14:27:12 - MyApp]   SHA-1: 53307dc2bd2b69fd5533458ee11885f55807de4b\n[2013-04-17 14:27:12 - MyApp] Jar mismatch! Fix your dependencies\n<\/code><\/pre>\n<p><strong>I know i am suppose to delete android-support-v4.jar from libs folder and keep only one copy for all. But, that is not solving my problem.<\/strong><\/p>\n<p>When i try to delete the android-support-v4.jar from <strong>MyApp<\/strong>, it gives me the following error.<\/p>\n<pre><code> Problems encountered while deleting resources.\n Could not delete 'C:\\Users\\santhosh\\My_Workspace\\MyApp\\libs\\android-support-v4.jar'.\n<\/code><\/pre>\n<p>When i try to delete the android-support-v4.jar from <strong>ABS<\/strong>, it gives me the following error<\/p>\n<pre><code> ????? cannot be resolved to a type error.\n<\/code><\/pre>\n<p>I have tried to clean the project, Fix Project Properties. Restart eclipse, Build, import and add again. I have tried to copy the support jar in libs folder from one library to other. delete the support jar in both libraries and add it to the MyApp project. Nothing has worked for me.<\/p>\n<p><strong>if i try to add single library, it works fine. i am facing the problem when trying to add 2 or more libraries to a single project.<\/strong><\/p>\n<p>Any help would be appreciated. Thanks.<\/p>\n<p><strong>Edit:<\/strong><\/p>\n<p>error getting when i add two libraries in MyApp:<\/p>\n<pre><code>The project was not built since its build path is incomplete. \nCannot find the class file for android.support.v4.app.FragmentActivity. \nFix the build path then try building this project MyApp Unknown Java Problem\nThe type android.support.v4.app.FragmentActivity cannot be resolved. It is indirectly referenced from required .class files MyActivity.java\/MyApp\/src\/com\/santhosh\/myapp    line 10 Java Problem\nJar mismatch! Fix your dependencies MyApp Unknown Android Dependency Problem\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Steps to reproduce: create a android project &#8220;MyApp&#8221; import ActionBarSherlock(ABS),Directional ViewPager(DVP), or any other open source library. Add the libraries to the project &#8220;MyApp&#8221; Console log: [2013-04-17 14:27:12 &#8211; MyApp] Found 2 versions of android-support-v4.jar in the dependency list, [2013-04-17 14:27:12 &#8211; MyApp] but not all the versions are identical (check is based on SHA-1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7389","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7389"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7389\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}