tamtoum1987
tamtoum1987

Reputation: 2067

Crash Caused by java.lang.UnsupportedOperationException Can't convert value at index 2 to dimension: type=0x1

I can see a crash report on crashlytics only concern a device Nexus 5X with android OS version: android 8.1.0 and android 11, and i can't reproduce the crash even on a nexus 5 emulator

Fatal Exception: ja va.lang.RuntimeException Unable to start activity ComponentInfo{xxxx.xxxxx.android/xxxx.xxxxx.android.SignInFailedActivity}: android.view.InflateException: Binary XML file line #34: Binary XML file line #34: Error inflating class TextView Caused by android.view.InflateException Binary XML file line #34: Binary XML file line #34: Error inflating class TextView

Caused by android.view.InflateException Binary XML file line #34: Error inflating class TextView

Caused by java.lang.UnsupportedOperationException Can't convert value at index 2 to dimension: type=0x1

Line 34 xml activity SignInFailedActivity is : app:layout_constraintTop_toTopOf="parent" />

My TextView :

          <TextView
android:id="@+id/message_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/calibril"
android:text="@string/sign_in_failed_message"
android:textAlignment="center"
android:textColor="@color/xxxx_black"
android:textSize="@dimen/inscription_step_4_text_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

What I tried is double check that dimen/inscription_step_4_text_size is available on res/values/dimens.xml it’s equal to 20sp

Any help will be appreciated

Upvotes: 0

Views: 19

Answers (0)

Related Questions