The current 4.0.0 beta releases eg. 4.0.0-beta04 of AGP isn't compatible with v4.1.0 of this plugin.
When AGP is upgraded to say 4.0.0-beta04 it throws this error
Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':analytics'.
> Failed to notify project evaluation listener.
> com.android.build.gradle.internal.variant.BaseVariantData.getVariantConfiguration()Lcom/android/build/gradle/internal/core/GradleVariantConfiguration;
> com.android.build.gradle.internal.variant.BaseVariantData.getVariantConfiguration()Lcom/android/build/gradle/internal/core/GradleVariantConfiguration;
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
AGP 4+ has removed internal APIs that is used by this plugin
The current 4.0.0 beta releases eg.
4.0.0-beta04
of AGP isn't compatible withv4.1.0
of this plugin. When AGP is upgraded to say4.0.0-beta04
it throws this errorAGP 4+ has removed internal APIs that is used by this plugin