Home > Back-end >  how to solve this kotlin plugin problem in android project?
how to solve this kotlin plugin problem in android project?

Time:09-16

I cloned this udacity project and seems to have an earlier version of kotlin plugin and gradle. all good until i add a new fragment so when the gradle sync it shows this error

Caused by: org.gradle.internal.component.AmbiguousConfigurationSelectionException: Cannot choose between the following variants of org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10:

  • gradle70JavadocElements
  • gradle70RuntimeElements
  • gradle70SourcesElements
  • javadocElements
  • runtimeElementsWithFixedAttribute
  • sourcesElements

PS: Im new to android development

CodePudding user response:

Did you try downgrade version?

In your build.gradle(project level), downgrade from 1.7.10 to 1.6.21 Like this:

    classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21'
  • Related