Error inflating class androidx.constraintlayout.ConstraintLayout

Recently when we migrated one of our android application to AndroidX, using android studio’s option from “Refactor -> Migrate to AndroidX” , it was expected that everything should work fine but during compilation it failed with following error,

AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class androidx.constraintlayout.ConstraintLayout
AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.constraintlayout.ConstraintLayout" on path


Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )


This error has came because android was not able to find “androidx.constraintlayout.ConstraintLayout” class after migrating to androidX, since android uses “androidx.constraintlayout.widget.ConstraintLayout” class in androidX

hence search for all occurrences of “” and change those to “androidx.constraintlayout.widget.ConstraintLayout


Leave a Comment

Android Android Build system Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded