android / codelab-mlkit-android

Other
180 stars 99 forks source link

Migrating to Androidx causing the layout to crash #23

Closed padlanau closed 5 years ago

padlanau commented 5 years ago

when I applied Migrate to Androix, it changes the layout to this: <androidx.constraintlayout.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" then compilation gave me these issues: Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.constraintlayout.ConstraintLayout"

How to fix this?

padlanau commented 5 years ago

I solved it by adding widget like this : androidx.constraintlayout.widget.ConstraintLayout There is a bug in Migrating to Android x