I did 'Invalidate Caches/Restart' in Android studio and then I got this error while syncing gradle.
Cannot convert string value 'ML_MODEL_BINDING' to an enum value of type 'com.android.builder.model.AndroidGradlePluginProjectFlags$BooleanFlag' (valid case insensitive values: APPLICATION_R_CLASS_CONSTANT_IDS, TEST_R_CLASS_CONSTANT_IDS, TRANSITIVE_R_CLASS, JETPACK_COMPOSE)
I am using gradle 4.1.0-alpha05
classpath 'com.android.tools.build:gradle:4.1.0-alpha05'
I have tried clean project, rebuild project, deleted the build files and restarted Android Studio. Nothing worked
Thanks in advance
Had the same problem on IntelliJ 2020.1.3 .
What worked for me was updating gradle versions to the highest available:
in file build.gradle (project)
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0-beta03'
in file gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
I'm facing the same issue on my KMP project.
The problem is on AndroidGradlePluginProjectFlags.java
they add JETPACK_COMPOSE
and ML_MODEL_BINDING
to the BooleanFlag
enum, so probably somewhere in the build tools they are trying to access it but the plugin implementation does not have it yet.
I tried to use the Android Studio 4.1 Canary 6 and it works to my project, hopefully, it works to your need too.
As a reference, there is an issue on IntelliJ support site here.
Downgrading to 4.1.0-alpha02
got rid of the error.
Using Android Studio 4.1 Canary 2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With