I am trying to use Facebook login in my App with the Facebook library in Android Studio.
After following 9 tutorials about how to import that library on Android Stud
To build successfully the latest Facebook SDK with Android Studio, you also need to indicate to the build.gradle from the Facebook SDK to compile the bolt jar.
See my detailed post here
If you imported the library via File > Import Module
, Android Studio copied that facebook
directory into your project. The $PROJECT_ROOT/facebook/build.gradle
file references bolts.jar
:
dependencies {
compile files('../libs/bolts.jar')
compile 'com.android.support:support-v4:19.+'
}
Note that in the unziped archive from Facebook, there is a libs
folder in the parent folder (the ..
path) of the library. In your project, you need to point at the libs
folder in the facebook library folder. Change ..
to .
as below:
dependencies {
compile files('./libs/bolts.jar')
compile 'com.android.support:support-v4:19.+'
}