2013-02-12 15 views
2

請幫助解決以下錯誤。目前嘗試使用PhoneGap.I來整合Facebook Android SDK中已經遵循本教程:http://www.youtube.com/watch?v=mlpBgWiel2w和github上的資源:https://github.com/davejohnson/phonegap-plugin-facebook-connect.git 但得到了波紋管的錯誤: -如何解決下面的錯誤使用Phonegap的facebook android sdk集成

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; 
+0

確保清理您的項目。並且請檢查你是否包括lib兩次。 – wmfairuz 2013-04-08 11:05:48

回答

6

日食有同樣的問題,我做了下面,它爲我工作

1右鍵點擊您的Android項目
2- 屬性 >>>Java構建帕特^ h
3-點擊Android的依賴
4-點擊刪除 >>>OK
5-運行Android項目

+1

做了所有其他的建議,你的解決方案工作:)謝謝分享 – Sumas 2013-08-05 20:00:11

+0

工作得很好。謝謝! – Adem 2013-12-18 16:23:30

+0

不能有這個工作:/ – 2014-06-25 06:43:12

2

它是一個很簡單的辦法,雖然這似乎是非常艱難問題來解決。

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

由於這步工作對我來說

0

我有這個問題,但可能已經解決了。在平臺/機器人,運行:

find . -name "AsyncFacebookRunner.class" 

對於我來說,這個發現的類都platforms/android/ant-build/platforms/android/FacebookLib/ant-build。由於FacebookLib中會有一個jar,所以該類最終會多次。我設法通過確保Eclipse已關閉,然後從platforms/androidplatforms/android/FacebookLibplatforms/android/CordovaLib中刪除所有bingen,ant-buildant-gen目錄,然後再次運行構建命令來解決此問題。之後,上述查找命令僅在FacebookLib/ant-build中找到該類的一個副本。