For some time now, I havent been able to compile a...
# android-studio
z
For some time now, I havent been able to compile and run any of my custom build types due to the following error:
No matching variant of app.cash.sqldelight:android-driver:2.0.1 was found. The consumer was configured to find a library for use during compile-time...
Any ideas? Some more details in 🧵
My application has this:
Copy code
buildTypes {
        debug {
            minifyEnabled false
            shrinkResources false
            crunchPngs false
            signingConfig signingConfigs.debug
        }

        release {
            minifyEnabled true
            shrinkResources true
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), '<http://proguard-rules.pro|proguard-rules.pro>'
        }

        staging {
            initWith release
            minifyEnabled false
            shrinkResources false
        }
    }
And my library with sql-delight simply has this:
Copy code
buildTypes {
    debug
    release
    staging
}
Debug and release builds work perfectly fine.
m
I've experienced this issue 1 or 2 times in the past, and I saw similar ones https://proandroiddev.com/fixing-dependency-metadata-in-gradle-65fd86abe4e1. I think this happens when gradle can't find a matching variant for the corresponding build type & it can't fallback to a default value that is specified by matchingFallbacks property, you can try adding this property as a fallback for your custom build types or re-write `sqldelight-driver`'s aar metadata file as the article above proposes. Also, are you sure that AS is the suspect here(especially if you're not able to compile those from command line as well)? maybe it happened when you updated
sqldelight
version to
2.0.1
or something like that?
🙏🏽 1
z
Ive experienced this issue for a few months .. posted about it here yesterday, and today it just magically works. 🤷🏽‍♂️ I have matchingFallbacks specified for release, then debug, which I think ships with most libraries (at least sql-delight)? The issue has been consistent between 2.0.0 and 2.0.1; I even mentioned it in their slack a while back! In either case, thanks for sharing your input!
👌 1