Inheritance from an interface with '@JvmDefault' members is only allowed with -Xjvm-default option

Viewed 1041

I updated kotlin version on Android studio

ext.kotlin_version = '1.6.10'

Unfortunately I am getting build error

Inheritance from an interface with '@JvmDefault' members is only allowed with -Xjvm-default option

How can I fix this?

1 Answers

Just set in your module build.gradle file:

   android {
   // ...
      kotlinOptions {
        jvmTarget = "1.8"
        freeCompilerArgs += [
            '-Xjvm-default=enable'
        ]
      }
   }
Related