Conversion to Dalvik format Failed facebook/Access

2019-02-19 01:17发布

问题:

Here are my logs:

[2013-02-09 19:48:50 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/facebook/AccessToken$SerializationProxyV1;
[2013-02-09 19:48:50 - MainActivity] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/facebook/AccessToken$SerializationProxyV1;

I tried

  • Clean Up Project
  • Delete libs folder
  • Restart Eclipse
  • Remove android-support-v4.jar

But none of them resolved my problem.

回答1:

Well, it depends if you build the Facebook SDK only, or you've included it as Library for your own Android project (I suppose that's the case). If you have some JAR's within your project folder (added as JARs to your project), remove them and copy them somewhere outside your project root, then add them again as the external jars. This question might be possible duplicate.



回答2:

Non of the above worked for me. I had duplicate facebooksdk.jar files in the libs and Android Dependencies folders.

I deleted the facebooksdk.jar file from the libs folder and it worked.