Так что мое приложение android использует AndroidX, и я использую тему компонентов материалов во всех своих приложениях, но у меня возникают сбои с некоторыми пользователями со следующей ошибкой
Вызывается android .view.InflateException: двоичная XML строка файла № 46: двоичная XML строка файла № 46: ошибка надувания класса com.google. android .material.button.MaterialButton
Теперь я Я проверил мою строку 46 на моем loginFragment, который приносит эту проблему
Строка 46 выглядит следующим образом
<com.google.android.material.button.MaterialButton
android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
android:id="@+id/btn_google_signin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="16dp"
android:text="Sign in with Google"
android:textColor="@color/black"
app:cornerRadius="10dp"
app:icon="@drawable/googlelogo"
app:iconSize="30dp"
app:iconTint="@null"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" />
Но все мое приложение использует MaterialComponents в качестве AppTheme, так что это странно ... после этого Кнопка - это кнопка Facebook, которая, как я подозреваю, связана с
<com.facebook.login.widget.LoginButton
android:id="@+id/btn_facebook_signin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginStart="16dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="50dp"
android:gravity="center"
android:paddingTop="12dp"
android:textSize="15sp"
android:paddingBottom="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_google_signin" />
Итак, я вошел в класс LoginButton, и это зависит от библиотеки поддержки, которую я не использую в своем приложении, теперь мой вопрос: почему ошибка в моей первой MaterialButton, а не в кнопке facebook, которая имеет поддержку?
Я планирую добавить к этой кнопке style = "MaterialComponents.Light", может ли это решить проблему ??
Больше изображений cra sh (Просто случается с android 6.0 устройствами и более на устройствах Samsung, J1 и j7 prime)
Есть подсказка, откуда появилась эта ошибка?