简体   繁体   中英

android parse sdk with Facebook sdk

I am integrating Parse sdk to my project.
I have Facebook sdk already in my project.
After i imported the parse .jars and run my project, eclipse has the following error message in Console tab (instead of LogCat tab):
Unable to execute dex: Multiple dex files define Lbolts/AggregateException;
Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lbolts/AggregateException;

I have created a fresh new project and import the 2 sdk, same errors come out. When I take out one of them, problem gone.

Parse sdk also supports some (if I am not wrong) Facebook functions like Facebook login. But I also need Facebook sharing and I cannot find parse sdk supporting it. So I still need the native Facebook sdk.

Anyone also have the same problem? Any solution for it?...
Great thanks in advance

I figured out that if I only imported the "parse.jar" and leave the "bolts.jar" not imported, everything works fine and I did receive push notification after completing the remaining procedures from Parse website.

It also works for iOS side. Simply import Parse framework and left Bolts framework not imported.

I wonder if this is the best solution but at least it works for me

I use eclipse and I didn't see the imports..

Besucally you need to understand that the problem is that somewhere somehow there are duplicates jar file. Usually this caused because multipul libraries that you use that have same jars files.

For me - both facebookSDk and the ParseLoginUI had bolts jar. because the ParseLoginUI uses facebookSDK library, Ieft the file only in the facebookSDK library

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM