In my case the error was importing the dependency:
implementation 'com.firebaseui:firebase-ui:2.3.0'
and I was not using it, it started working when I deleted it cleaned project and recomplied. Of course I also did what the people above did which was:
- Changing complie to implementation throughout the whole app.grade
- Changing testcomplie to testimplementation throughout the whole app.grade
- Make sure I have multidexenabled true
- Update compileSdk to 26
- Deleted .gradle file (found in project), clean project and recompile
and finally...
- Deleted implementation 'com.firebaseui:firebase-ui:2.3.0' (Since I was not using it in my code)