-3

I read this website

https://www.androidhive.info/android-working-with-databinding

but when I write ActivityMainBinding class, I get an unknown error.

and when rebuilding the project I see these errors:

Android studio screenshot. Error: Lambda expressions are not supported in source...

1 Answers1

0

You are using lambda expression somewhere in your source code without java 1.8 enabled. You must add compileOptions in your app/build.gradle file.

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
gaebal
  • 3
  • 5