Failed to resolve: com.facebook.android:facebook-android-sdk:[4,5)
Solution 1:
Follow the below procedure to resolve the issue:-
Click on
Project Structure
from the icon available in thetool bar
above.Open
Dependencies
tab.-
select
com.facebook.android:facebook-android-sdk:[4,5)
Remove the facebook dependency by clicking the minus(
-
) button on the extreme right side.Now, Click on Plus(
+
) button on the right side above Minus button. SelectLibrary dependency
Type
Facebook
on the search input box and click on the search button.Choose
com.facebook.android:facebook-login
. click onOk
. Sync your Gradle.
This will resolve your issue. As it has worked for me.
Solution 2:
Use this dependency for Facebook SDK. It will work. (Tested on Android Studio version 3.0 and above)
implementation 'com.facebook.android:facebook-login:4.30.0'
Solution 3:
remove compile 'com.facebook.android:facebook-android-sdk:[4,5)'
And add below dependency it resolve my problem
compile 'com.facebook.android:facebook-android-sdk:4.26.0'