Cannot convert string value ‘unified_test_platform’ 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, ml_model_binding)

The error message states that there is an issue with converting the string value ‘unified_test_platform’ to an enum value of type ‘com.android.builder.model.androidgradlepluginprojectflags$booleanflag’. The valid case insensitive values for this enum type are:

  • application_r_class_constant_ids
  • test_r_class_constant_ids
  • transitive_r_class
  • jetpack_compose
  • ml_model_binding

To fix this error, ensure that the string value being used is one of the valid enum values. For example:

// Incorrect usage
androidgradlepluginprojectflags {
    booleanflag = "unified_test_platform"
}

// Correct usage
androidgradlepluginprojectflags {
    booleanflag = "test_r_class_constant_ids"
}
    

Read more interesting post

Leave a comment