I was trying to build my project again after installing the latest preview version of android studio, but follow exception is showing on updating the gradle version:
In my case it fixed by adding:
android { ... compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 // <= add this targetCompatibility JavaVersion.VERSION_1_8 // <= add this } }
to android/app/build.gradle file