So, I am getting the following error while running the project after upgrading build.gradle (Project) from
dependencies {
classpath \'com.android.too
Just clean and retry solved for me.
Okay. I don't know how but this worked.
First I cleaned the project and then, running the project made everything go alright.
Inshort, First Clean and then Run.
Edit First Clean and then Make Project also works.
Thing that worked for me.
I met the same problem.
First delete build folder from project location (You can access it via android studio or using explorer), then build the project.
In case it helps someone, in my case I was using a custom package in release mode instead of in debug mode.
I just changed the package from "release" to "debug" and it worked.
In My case, I First Clean the project then i press Make Project button as below image, then it start working. Rebuild doesn't work for me.
And I also updating Google Repository is must.