'How to connect with FireBase in AndroidStudio?

I want to connect firebase in Android Studio. and I met "Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync". I figured it out i have to delete jcenter() in allprojects methods. But in my app, I cannot find allprojects() and i found from Arctic Fox and higher do not include this. Instead, they use a slightly different system, one that is configured in settings.gradle. Then how can i fix this error?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source