Yesterday,my app was working fine.
Today, I don\'t know why, the app didn\'t compile anymore after I reopened the Android Studio.
The error shown is
For me the problem seemed to be caused by the android build tools
To fix, I had to downgrade these in mu projects top level build.gradle file
- classpath 'com.android.tools.build:gradle:3.1.0'
+ classpath 'com.android.tools.build:gradle:3.0.1'
I'm aware this is not the best solution, but so far the only thing that worked for me.
EDIT: Alternatively, add android.enableD8=false to your project gradle.properties file