Could not parse the android application Module's Gradle config

Error

Could not parse the android application Module's Gradle config. Firebase assistant problem.

Steps to Reproduce

  1. Open Android Studio.
  2. In Tools in the menu bar, select Firebase. This will open Firebase Assitant to the right.
  3. Select Realtime Database from the list, and click Get Started with Realtime Database.
    Ashwith's Blogs
  4. Click on Connect to Firebase button.
    Ashwith's Blogs
  5. You will encounter the error.

Solution

  1. Open gradle script, select module gradle.
    Ashwith's Blogs
  2. Edit versions of the compileSdk and targetSdk, & make it 31.
    Ashwith's Blogs
  3. Click Sync Now at the top.
  4. After Syncing is done, again click on Connect to Firebase.
  5. Firebase will be opened in the browser.