android-studiogradle-kotlin-dsltoml

Why the dependency conversion to version catalog doesn't always work?


H|

Sometimes when I use the Android Studio feature to convert a dependency implementation to version catalog like this:

enter image description here

it fails like this:

enter image description here

Any idea why?

(after pressing Sync Now, it's not red anymore, and it works)

Regards

(When I tried to post, it displayed "Your post is mostly images. Add additional details to explain the problem and expected results.")


Solution

  • It's just a display issue: Until the version catalog is processed by a Gradle Sync, the compiler won't fully recognize all changes you have done.

    The error should vanish when you perform a Gradle Sync.