Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook SDK doesn't support on AndroidX

I got this error on facebook SDK. I'm using androidx to my support library enter image description here

heres my gradle enter image description here

looking into the activity itself uses supportv4 libraries enter image description here whats the possible fix here?

like image 564
Rashid Avatar asked Dec 14 '18 05:12

Rashid


2 Answers

Try this use latest dependencies

implementation 'com.facebook.android:facebook-android-sdk:4.39.0'
implementation 'com.facebook.android:facebook-share:4.39.0'

Update

AFAIK the current SDK of facebook does not support with AndroidX

You can check here

Facebook SDK for Android

Facebook SDK for Android Changelog 4.x

4.39.0 - December 5, 2018

Modified

In-app purchase auto logging is turned on by default. Android auto-logged purchases can be verified with uploaded credentials. Lean More

Fixed

Various bug fixes

UPDATE 2

i have reported a bug

  • latest com.facebook.android:facebook-android-sdk:4.39.0 is not supported with AndroidX

here is the Latest Response from Facebook Team

Hi Nilesh,

Thanks for reaching out. I'm afraid the current SDK doesn't support AndroidX. Unfortunately I don't have a timeline on when support for the library will be released, but stay tuned to our developer channels for any announcements in the future.

Regards, Marc

enter image description here

like image 155
AskNilesh Avatar answered Nov 17 '22 15:11

AskNilesh


I solved it by adding this two lines in gradle.properties

android.useAndroidX=true
android.enableJetifier=true
like image 40
Sway Avatar answered Nov 17 '22 14:11

Sway