Error inflating class androidx.constraintlayout.widget.ConstraintLayout

前端 未结 12 1183
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-29 18:28

After migrating to Androidx packages using Android Studio menu option Refactor -> Refactor to Androidx...

I\'m getting the following error:

Error inf         


        
12条回答
  •  半阙折子戏
    2020-12-29 19:08

    Well in my case I've tried Solution 1 which still was not working. Then I used Solution 2 along with Solution 1.


    Solution 1

    Updating the current version ConstraintLayout in app level build.gradle file.

    From

    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    

    Into

    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    

    Solution 2

    Invalidate Caches and Restart Android Studio (If still not working after applying Solution 1).

    FileInvalidate Caches / RestartInvalidate and Restart

    I used both of them and It works fine for me.

    Note: Solution 1 is important.

提交回复
热议问题