Error Gradle failed after adding cordova google analytics plugin

Brief error:
Gradle Daemon started in 2 s 179 ms
Dependency resolved to an incompatible version: Dependency(fromArtifactVersion=ArtifactVersion(groupId=com.google.android.gms, artifactId=play-services-analytics-impl, version=11.0.1), toArtifact=Artifact(groupId=com.google.android.gms, artifactId=play-services-base), toArtifactVersionString=[11.0.1])

FAILURE: Build failed with an exception.

** What went wrong:*
In project ‘app’ a resolved Google Play services library dependency depends on another at an exact version (e.g. "[11.0.
1]", but isn’t being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: com.google.android.gms:play-services-analytics-impl:11.0.1 -> com.google.android.gms:play-services-b
ase@[11.0.1], but play-services-base version was 17.0.0.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
– Project ‘app’ depends onto com.google.android.gms:play-services-tagmanager-v4-impl@{strictly 11.0.1}
– Project ‘app’ depends onto com.google.android.gms:play-services-analytics-impl@{strictly 11.0.1}
– Project ‘app’ depends onto com.google.android.gms:play-services-analytics@{strictly 11.0.1}
– Project ‘app’ depends onto com.google.android.gms:play-services-analytics@11.0.1
– Project ‘app’ depends onto com.google.android.gms:play-services-base@{strictly 17.0.0}

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding “googleServices { disableVersionCheck = false }” to your b
uild.gradle file.

** Try:*
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

** Exception is:*
com.intellij.openapi.externalSystem.model.ExternalSystemException: In project ‘app’ a resolved Google Play services library dependency depends on another at an exact version (e.g. "[11.0.
1]", but isn’t being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: com.google.android.gms:play-services-analytics-impl:11.0.1 -> com.google.android.gms:play-services-b
ase@[11.0.1], but play-services-base version was 17.0.0.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
– Project ‘app’ depends onto com.google.android.gms:play-services-tagmanager-v4-impl@{strictly 11.0.1}
– Project ‘app’ depends onto com.google.android.gms:play-services-analytics-impl@{strictly 11.0.1}
– Project ‘app’ depends onto com.google.android.gms:play-services-analytics@{strictly 11.0.1}
– Project ‘app’ depends onto com.google.android.gms:play-services-analytics@11.0.1
– Project ‘app’ depends onto com.google.android.gms:play-services-base@{strictly 17.0.0}

Project was running perfectly, until I added this google analytics plugin.

After running ionic build -prod, npx cap sync and ionic capacitor open android, my project wont build gradle successfully.

Appreciate any help.