Android Studio's UI was just hiding the error...
when the error occurred, it highlighted the item in the list view, and showed an unhelpful message in the terminal view.
to find the real error, select the root item in the list view so that Android Studio would display the whole build output in the terminal view, then scroll to find error.
Maybe I am a bit late for the answer but, anyways, I was getting the same error. The build failure can be caused by some error that Android Studio fails to point out probably due the the project size being very large.
Here is the easy way to point out the exact error.
In Android studio go to Analyze menu and click on Inspect Code; check whole project, click OK and wait for the inspection to finish.
Now you will see a tab that will point all the errors, warnings etc and you can now resolve the real issue.
The way to find out what the underlying issue is, is to run the following command :
./gradlew assembleDebug --stacktrace
Change
implementation "android.arch.persistence.room:runtime:1.1.1"
kapt "android.arch.persistence.room:compiler:1.1.1"
To (updated 4 - September-2021)
implementation "androidx.room:room-runtime:2.3.0"
annotationProcessor "androidx.room:room-compiler:2.3.0"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With