Android Gradle plugin, issue with Google’s maven repo

After attempt to add Firebase client library into root level Gradle config build.grade, I caught error during Android Studio syncing:

Caused by: org.gradle.internal.event.ListenerNotificationException: Failed to notify project evaluation listener.
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(
... 85 more
Caused by: java.lang.NoSuchFieldError: JAVA_LETTER_OR_DIGIT

Googling have not helped a lot, but changing version did.
Downgrade you Firebase library a bit, e.g down to v 4.2.0 and you sync will complete successfully.
classpath ''

Adding an older version helps avoid this exception but it doesn’t solve the root of the problem and it’s not obvious what causes it.

At first I think that it’s because the newest version has appeared in Android Firebase setup guide before actually became available in public Google Maven repo. But searching through the repo helped to find out it’s not the case.

The real problem was with Android Gradle plugin. Mine was ‘’ and it doesn’t work properly with google’s maven repository.
So you have to use google-services library versions available in AndroidTools Repository. Like from above which is present in AndroidTools repo while is not.

After updating gradle plugin for Android Studio to '' you need also update gradle wrapper version, otherwise you get error
Minimum supported Gradle version is 4.6. Current version is 4.1.

Fix it by clicking on Android Studio’s suggestion “Fix Gradle wrapper and re-import project” or by yourself, bumping version in %YOUR_PROJECT%/gradle/wrapper/ file


When all this is done you can finally add to your dependencies actual version from Firebase setup guide:
classpath ''

Leave a Reply