Ad

Import Facebook SDK In Android Studio 2.0

- 1 answer

I downloaded the Facebook SDK 4.8.2 and want to import in the Android Studio 2.0. I added dependencies compile 'com.facebook.android:facebook-android-sdk:4.+' and compile 'com.facebook.android:audience-network-sdk:4.+' on build.gradle. When I try to import the module that is in the Facebook SDK directory, the error as shown below.

enter image description here

I realized that within the facebook-android-sdk-4.8.2 directory there are facebook and AudienceNetwork directories. I need to import both?

Ad

Answer

You don't need to download the SDK, just add this dependencies in your gradle

  compile 'com.facebook.android:facebook-android-sdk:4.7.0'

For 4.8.6 I'm not really sure if it's already in maven central or not but you can try it.

Ad
source: stackoverflow.com
Ad