Error inflating class androidx.constraintlayout.ConstraintLayout after migration to androidx

后端 未结 17 1161
[愿得一人]
[愿得一人] 2020-11-27 14:24

I just made a migration to androidx through Android Studio menu option Refactor -> Refactor to AndroidX

I\'m getting the following

相关标签:
17条回答
  • 2020-11-27 15:10

    yepp. mavenCentral() and correct dependencies solve my same problems

    0 讨论(0)
  • 2020-11-27 15:11

    If after adding mavenCentral() as a repository in your Gradle file and changing androidx.constraintlayout.ConstraintLayout to androidx.constraintlayout.widget.ConstraintLayout didn't solve your problem then try doing Invalidate cache and restart from the file menu. It worked for me.

    0 讨论(0)
  • 2020-11-27 15:11

    I copied and pasted an existing ConstraintLayout tag from the xml, which was causing the issue for me. Simply deleting, and re-adding the ConstraintLayout tags in AndroidStudio from scratch fixed the issue for me.

    0 讨论(0)
  • 2020-11-27 15:11

    I updated the dependency, yet it did not resolve the error. Then I did a clean project and build and it is working now.

    0 讨论(0)
  • 2020-11-27 15:12

    build.gradle => check dependencies version

    implementation 'androidx.constraintlayout:constraintlayout:1.1.1'
    


    to change

    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    

    solved the problem

    0 讨论(0)
提交回复
热议问题