Ich möchte Facebook mit Firebase in meiner Android-App anmelden, so nach dem Verbinden meiner App mit Firebase habe ich die Abhängigkeit von Facebook sdk compile 'com.facebook.android:facebook-android-sdk:[4,5)'
hinzugefügt, aber wenn ich meine App dann laufen zeigt esInflateException während der Anmeldung mit Facebook Firebase in Android
android.view.InflateException: Binary XML-Datei Zeile # 20: Binary XML-Datei Zeile # 20: Fehler aufblähenden Klasse com.facebook.login.widget.LoginButton
XML-Code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.environer.becofriend.MainActivity"
android:orientation="vertical"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.facebook.login.widget.LoginButton
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
Anmerkung: Ich habe keinen Code in meinem MainActivity hinzugefügt, weil die sdk automatisch in neuen sdk initialisiert
Verwenden FirebaseUI-Auth. Es ist einfacher und unkomplizierter –