ClassNotFoundException: Didn't find class "android.support.constraint.ConstraintLayout" on path

You may have updated to AndroidX support library and the layout is referencing the old ConstraintLayout version. So you have to update the android.support.constraint.ConstraintLayout tags to androidx.constraintlayout.widget.ConstraintLayout in your layout XML.


Changes you have made earlier corrupted your Gradle File (the module one). It should look like this:

apply plugin: 'com.android.application'

android {

    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "***" /*Your package name*/
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 5
        versionName "1.4"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
repositories {
    jcenter()
    maven { url "https://jitpack.io" }
}

dependencies {
//Your Dependencies
//Don't forget to add dependency of constraint-layout
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
}

Add dependency for constraint-layout. See Code

NOTE : compile has become obsolete and replaced with 'implementation' keyword so replace 'compile' with 'implementation'

so the code will be

dependencies {
//Your Dependencies
//Don't forget to add dependency of constraint-layout
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
}

UPDATE: If you have upgraded to AndroidX now. Then you need to use androidx.constraintlayout.widget.ConstraintLayout instead of android.support.constraint.ConstraintLayout