Home > Software design >  Inheritance from an interface with '@JvmDefault' members is only allowed with -Xjvm-defaul
Inheritance from an interface with '@JvmDefault' members is only allowed with -Xjvm-defaul

Time:02-23

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?

CodePudding user response:

Just set in your module build.gradle file:

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