After migrating to Androidx packages using Android Studio menu option Refactor -> Refactor to Androidx...
I\'m getting the following error:
Error inf
Make sure constraint layout is updated to latest version:
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
And replace your xml tag names
<androidx.constraintlayout.ConstraintLayout>
with
<androidx.constraintlayout.widget.ConstraintLayout>
in every place where it appears using this shortcut:
Windows: CTRL + SHIFT + R
Mac: COMMAND + SHIFT + R
Since the Android Studio is updated to 3.3 it will pop this error. I resolved it by upgrading the version for constraint layout in the build.gradle
of the app level:
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
TO
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
In AndroidStudio 3.4 I had to downgrade to
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
to get it working again.
Android Studio is updated version 3.3. Please remove the previous version constraintLayout
my case used this
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
Thank you
Just replace
<androidx.constraintlayout.ConstraintLayout>
with
<androidx.constraintlayout.widget.ConstraintLayout>
In your project's xml files.
You can use Replace in Path shortcut in mac (⇧⌘F or ⇧⌘R) and windows (Ctrl+Shift+R)
In AndroidStudio 3.3 RC2 I got it resolved by upgrading -
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
to
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
in build.gradle (Module: app)
Note: This solution is also valid for the release version 3.3 (as per below comment by FireZenk), 3.5.2 (as per below comment by user2350644)