Gradle 4.0 Unable to find a matching configuration

This issue is fixed and everything works fine in the Stable 3.0 version. If you still face this issue, that's because there is no fallback mechanism.

If your app includes a build type that the library doesn't then you will get this error. To fix this, you need to provide matchingFallbacks to your build type. Refer the Resolve build errors related to Dependency matching section in this documentation

In case of build types do the below, and if it's product flavors refer the documentation for migration.

buildTypes {
    release {
       //...
    }
    debug {
       //...
    }
    innerTest {
        //...
        matchingFallbacks = ['debug', 'release']
    }
}

and simply add your dependencies like below:

dependencies {
    implementation project(':abChat')
}

This worked after a long research.

Replace:

implementation project(':abChat')

To:

implementation project(path:':abChat', configuration: 'default')

in your app

dependencies {
    debugImplementation project(':abChat')
    innerTestImplementation project(':abChat')
    releaseImplementation project(':abChat')
}

in your libary abChat

buildTypes {
    release {}
    debug{}
    innerTest{}
}

Make sure you have the exact list(names) of build configurations (buildTypes) in all of your modules.

In my pre-3.0 setup, I was having only debug{} and release{} in all of my com.android.library modules. I added one more configuration similar to that of :app module. It builds fine for me.