Gradle Build Failed When add firebase

First build is normal. I added firebase sdk 12.5.0 . Then it build failed. Then i do this


then it error:

Then i changed gradle

it continues to error

But i can’t change JDK

Please help!