0

I'm learning Flutter and wanted to use an audio player Flutter package.

After setting everything up in pubspec.yaml i got the following error when i want to run the application on the emulator:

Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors

Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.

I was reading about this problem and also changed the version in the build.gradl but this did not help. It still can't find the version 1.1.15 afterwards.

How to solve this problem?

halfer
  • 19,824
  • 17
  • 99
  • 186
Karl
  • 79
  • 1
  • 7
  • 2
    This answers your question: [Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15](https://stackoverflow.com/questions/67699823/module-was-compiled-with-an-incompatible-version-of-kotlin-the-binary-version-o) – halfer Aug 22 '21 at 19:10

1 Answers1

4

Finally i could fix it myself:

I needed to change in build.gradle to 1.4.32

No idea why but it works! :-)

buildscript {
    ext.kotlin_version = '1.4.32'
    repositories {
        google()
        jcenter()
    }
Karl
  • 79
  • 1
  • 7