I received an email from Facebook that my app's login via Facebook was using an old SDK and I need to update to a new one (version 9).
In my gradle I see this line:
implementation 'com.facebook.android:facebook-login:4.40.0'
which is the only line mentioning facebook (though I do the login using firebase
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
so that might be it)
Anyway, I looked on the Facebook Developer page here and it seems to say I should add this line
implementation 'com.facebook.android:facebook-login:[8,9)'
which looks odd to me because of the mismatched braces. Anyway, if I put that in I get an error on syncing:
Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not find any version that matches com.facebook.android:facebook-login:[8,9).
So, I'm unsure how to proceed to version 9 of the SDK. Does anyone know how to do this?
The highest numbers I got my gradle to accept were:
implementation 'com.facebook.android:facebook-login:7.+'
It's not clear to me how to get to version 9
Add this to Module-level /app/build.gradle before dependencies:
repositories {
// You can also use jcenter if you prefer
mavenCentral()
}
Add the compile dependency you need with the latest version of the Facebook SDK in the build.gradle file:
dependencies {
implementation 'com.facebook.android:facebook-login:[8,9)'
}
Or
Follow the below procedure to resolve the issue:-
Click on Project Structure from the icon available in the tool bar above.
Open Dependencies tab.
select com.facebook.android:facebook-login:[8,9)
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. Select Library dependency
Type Facebook on the search input box and click on the search button.
Choose com.facebook.android:facebook-login
. click on Ok. Sync your Gradle.
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.