0

Truly been going through a nightmare trying to work with an android project w/ Facebook. The nightmare is it worked, then i must have touched one of my XMLs and now Eclipse REALLY has **** the bed. I can't run anything.

So I've narrowed it down a bit. My project has the dreaded lack of an R file. Cleaning does nothing. When I try to add import of com.example.packagename.R it doesn't know what I'm talking about. When I try to run my project:

[2014-11-21 16:58:56 - DiabetesMadeEasy] All versions of the libraries must be the same at this time.
[2014-11-21 16:58:56 - DiabetesMadeEasy] Versions found are:
[2014-11-21 16:58:56 - DiabetesMadeEasy] Path:    C:\Users\Phil\workspace\appcompat_v7\libs\android-support-v4.jar
[2014-11-21 16:58:56 - DiabetesMadeEasy]    Length: 995386
[2014-11-21 16:58:56 - DiabetesMadeEasy]    SHA-1: a13f8fe2c278737e2f0b6fcf00f6b2ae4034aacf
[2014-11-21 16:58:56 - DiabetesMadeEasy] Path: C:\Users\Phil\Desktop\facebook-android-sdk-3.20.0 (1)\facebook-android-sdk-3.20.0\facebook\libs\android-support-v4.jar
[2014-11-21 16:58:56 - DiabetesMadeEasy]    Length: 758727
[2014-11-21 16:58:56 - DiabetesMadeEasy]    SHA-1: efec67655f6db90757faa37201efcee2a9ec3507
[2014-11-21 16:58:56 - DiabetesMadeEasy] Jar mismatch! Fix your dependencies
[2014-11-21 16:58:56 - DiabetesMadeEasy] Found 2 versions of android-support-v4.jar in the dependency list,
[2014-11-21 16:58:56 - DiabetesMadeEasy] but not all the versions are identical (check is based on SHA-1 only at this time).
[2014-11-21 16:58:56 - DiabetesMadeEasy] All versions of the libraries must be the same at this time.
[2014-11-21 16:58:56 - DiabetesMadeEasy] Versions found are:
[2014-11-21 16:58:56 - DiabetesMadeEasy] Path: C:\Users\Phil\workspace\appcompat_v7\libs\android-support-v4.jar
[2014-11-21 16:58:56 - DiabetesMadeEasy]    Length: 995386
[2014-11-21 16:58:56 - DiabetesMadeEasy]    SHA-1: a13f8fe2c278737e2f0b6fcf00f6b2ae4034aacf
[2014-11-21 16:58:56 - DiabetesMadeEasy] Path: C:\Users\Phil\Desktop\facebook-android-sdk-3.20.0 (1)\facebook-android-sdk-3.20.0\facebook\libs\android-support-v4.jar
[2014-11-21 16:58:56 - DiabetesMadeEasy]    Length: 758727
[2014-11-21 16:58:56 - DiabetesMadeEasy]    SHA-1: efec67655f6db90757faa37201efcee2a9ec3507
[2014-11-21 16:58:56 - DiabetesMadeEasy] Jar mismatch! Fix your dependencies
[2014-11-21 16:59:04 - DiabetesMadeEasy] Found 2 versions of android-support-v4.jar in the dependency list,
[2014-11-21 16:59:04 - DiabetesMadeEasy] but not all the versions are identical (check is based on SHA-1 only at this time).
[2014-11-21 16:59:04 - DiabetesMadeEasy] All versions of the libraries must be the same at this time.
[2014-11-21 16:59:04 - DiabetesMadeEasy] Versions found are:
[2014-11-21 16:59:04 - DiabetesMadeEasy] Path: C:\Users\Phil\workspace\appcompat_v7\libs\android-support-v4.jar
[2014-11-21 16:59:04 - DiabetesMadeEasy]    Length: 995386
[2014-11-21 16:59:04 - DiabetesMadeEasy]    SHA-1: a13f8fe2c278737e2f0b6fcf00f6b2ae4034aacf
[2014-11-21 16:59:04 - DiabetesMadeEasy] Path: C:\Users\Phil\Desktop\facebook-android-sdk-3.20.0 (1)\facebook-android-sdk-3.20.0\facebook\libs\android-support-v4.jar
[2014-11-21 16:59:04 - DiabetesMadeEasy]    Length: 758727
[2014-11-21 16:59:04 - DiabetesMadeEasy]    SHA-1: efec67655f6db90757faa37201efcee2a9ec3507
[2014-11-21 16:59:04 - DiabetesMadeEasy] Jar mismatch! Fix your dependencies

Then a million errors referring to these jars. I do not know how to fix these jars. I fear I will never fix them. I want to download another editor and start from scratch but I'm not sure if this is recoverable or not.

When i try to build appcombat_v7 it will not build. I get an obscure error in 1 of the files it need. res/values/values-large-v14/themes_base.xml. Some resource that can't be found.

How do I fix these jars? I'm in Eclipse... does Android studio similarly explode every now and again?

Abdallah Alaraby
  • 2,222
  • 2
  • 18
  • 30
PinkElephantsOnParade
  • 6,452
  • 12
  • 53
  • 91
  • @peter.petrov Thanks for the honesty. That is one less moment wasted. – PinkElephantsOnParade Nov 21 '14 at 22:45
  • This problem is a real mess. Seems no one really has a decent solution. By some chance I also spent 4-5 hours on this the other day and all suggested 'solutions' just don't make any sense (as doesn't the problem itself). Just recreate your project from scratch and see if that helps. – peter.petrov Nov 21 '14 at 22:45
  • Why are you using jar instead of importing them through Maven? – dannyroa Nov 21 '14 at 23:20

1 Answers1

0

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

You need to use the same android-support-v4.jar library in your project and all of its dependencies. try copying it from your project's lib folder and pasting it to the libraries you're using.

Abdallah Alaraby
  • 2,222
  • 2
  • 18
  • 30
  • Okay, that's a start. Issue now if whenever I clean and rebuild, added to my project is "Android Dependencies" in the build path. Android Dependencies ITSELF has an error. appcombat_v7.jar is missing from the bin of the respective name. I do not have appcombat_v7.jar anywhere. I have a project with that name in my workspace but it will not build. It says it needs appcombat-support-v7.jar and THAT is missing – PinkElephantsOnParade Nov 21 '14 at 23:05
  • The appcompat_v7 does not have implementation in `src` folder. Instead, it has two jars in the lib folder, one is the `android-support-v4.jar` and the other is the `android-support-v7-appcompat.jar`. If the latter one does not exist, you need to regenerate the appcompat library. Or maybe you need to fix your build path. Or change android build target version. that's all the possibilities I can think about so far :D – Abdallah Alaraby Nov 21 '14 at 23:20
  • you might also consider following the steps in [this answer](http://stackoverflow.com/a/21229781/2185634). – Abdallah Alaraby Nov 21 '14 at 23:22
  • Only problem is I know that I want to include the appcompat as a dependecy, but that project will not build. When I get it in my workspace that project has some errors in res/. It can't build so I suspect my actual app conks out too. – PinkElephantsOnParade Nov 21 '14 at 23:30
  • note that there are some changes in the appcompat library that enforces you to make some updates to your styles xml files. – Abdallah Alaraby Nov 22 '14 at 11:38