android : Error converting byte to dex

In my case, I put

apply plugin: 'com.google.gms.google-services'

at the bottom of build.gradle file and set multiDexEnabled true in defaultConfig. Then just run and it works.


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.


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.

enter image description here

And I also updating Google Repository is must.