I'm having trouble getting the Facebook SDK (v3.7) to work in my Android Intellij project.
I followed these steps to add the Facebook library as a new module to my project , but I keep getting this error:
java: cannot access android.support.v4.app.Fragment class file for android.support.v4.app.Fragment not found
Here is a screenshot of my module's dependencies:
And this is a screenshot of the Facebook module dependencies:
When I add the v4 support library to my own module, I get a different error:
Android Dex: [FunnyGific] com.android.dex.DexException: Multiple dex files define Lcom/facebook/AccessToken$1;
I tried using the android-support-v4.jar
I found in the facebook-android-sdk-3.7/facebook/libs
folder, also tried to import it via Maven and I keep getting the same errors. Any ideas here?
The only situation I could get it to work is by adding the Facebook mvn repository, but even in this case I'm getting some strange exception when I try to show the Facebook LoginButton (java.lang.ClassNotFoundException: com.facebook.android.R$color
):
<dependency>
<groupId>fr.avianey</groupId>
<artifactId>facebook-android-api</artifactId>
<version>3.8.0</version>
<type>aar</type>
</dependency>
Running out of ideas, would love some help to get this working.