For my case, I follow the steps from Firebase and by mistake I pated it in a wrong file.
Then, I returned to the project from Project to Android. Once in the Android view I pasted the file /projectname/app/YOUR-FILE-HERE and now, you have to compile again.