How to fix the following error for integrating sdk into facebook android using Phonegap

Help resolve the following error. We are currently trying to integrate the Android Android SDK using PhoneGap.I follow this guide: http://www.youtube.com/watch?v=mlpBgWiel2w and github resources: https://github.com/davejohnson/phonegap-plugin -facebook-connect.git But got the following error: -

   Error in an XML file: aborting build.
   Error in an XML file: aborting build.
   Dex Loader] Unable to execute dex: Multiple dex files define Lcom/facebook/android/AsyncFacebookRunner$1;
   Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/facebook/android/AsyncFacebookRunner$1;
   Unable to execute dex: Multiple dex files define Lcom/facebook/android/AsyncFacebookRunner$1;
    Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/facebook/android/AsyncFacebookRunner$1;
   Unable to execute dex: Multiple dex files define Lcom/facebook/android/AsyncFacebookRunner$1;
    Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/facebook/android/AsyncFacebookRunner$1;
+2
source share
3 answers

I had the same problem in eclipse and I did the following: worked for me:

1- Android-
2- → > Java
3- Android
4- → >
5. Android

+6

, .

1.Just make a copy of the project.
2.run the the copy of the project thats it!!!

+2

, . /android :

find . -name "AsyncFacebookRunner.class"

For me it found a class in both platforms/android/ant-build/, and in platforms/android/FacebookLib/ant-build. Since FacebookLib will have a bank, the class will end several times. I managed to solve this problem by making sure that Eclipse is closed, and then deletes all directories bin, gen, ant-buildand ant-genboth of platforms/androidand platforms/android/FacebookLiband platforms/android/CordovaLiband then start again, create a team. After that, the above find command found only one copy of the class, in FacebookLib/ant-build.

0
source

All Articles