Android build failed on ionic 4

Dependency resolved to an incompatible version: Dependency(fromArtifactVersion=ArtifactVersion(groupId=com.google.android.gms, artifactId=play-services-stats, version=15.0.1), toArtifact=Artifact(groupId=com.google.android.gms, artifactId=play-services-basement), toArtifactVersionString=[15.0.1])

FAILURE: Build failed with an exception.

  • What went wrong:
    Failed to capture fingerprint of input files for task ‘:app:preReleaseBuild’ property ‘compileManifests’ during up-to-date check.

In project ‘app’ a resolved Google Play services library dependency depends on another at an exact version (e.g. “[15.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-stats:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.0.1.

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.firebase:firebase-common@16.0.0
– Project ‘app’ depends onto com.google.firebase:firebase-measurement-connector@16.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-basement@16.0.1
– Project ‘app’ depends onto com.google.firebase:firebase-iid@16.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-places-placereport@16.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-tasks@16.0.1
– Project ‘app’ depends onto com.google.android.gms:play-services-location@16.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-location@16.+
– Project ‘app’ depends onto com.google.firebase:firebase-iid-interop@16.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-base@16.0.1
– Project ‘app’ depends onto com.google.firebase:firebase-messaging@17.0.+
– Project ‘app’ depends onto com.google.android.gms:play-services-stats@15.0.1
– Project ‘app’ depends onto com.google.firebase:firebase-messaging@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 --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s
3 actionable tasks: 1 executed, 2 up-to-date
/Users/kodetra/KodetraTechnologies/Projects/Ionic/kharidaree/kharidaree-app/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    Failed to capture fingerprint of input files for task ‘:app:preReleaseBuild’ property ‘compileManifests’ during up-to-date check.

In project ‘app’ a resolved Google Play services library dependency depends on another at an exact version (e.g. “[15.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-stats:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.0.1.

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.firebase:firebase-common@16.0.0
– Project ‘app’ depends onto com.google.firebase:firebase-measurement-connector@16.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-basement@16.0.1
– Project ‘app’ depends onto com.google.firebase:firebase-iid@16.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-places-placereport@16.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-tasks@16.0.1
– Project ‘app’ depends onto com.google.android.gms:play-services-location@16.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-location@16.+
– Project ‘app’ depends onto com.google.firebase:firebase-iid-interop@16.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-base@16.0.1
– Project ‘app’ depends onto com.google.firebase:firebase-messaging@17.0.+
– Project ‘app’ depends onto com.google.android.gms:play-services-stats@15.0.1
– Project ‘app’ depends onto com.google.firebase:firebase-messaging@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 --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s
[ERROR] An error occurred while running subprocess cordova.

    cordova build android --release exited with exit code 1.
    
    Re-running this command with the --verbose flag may provide more information.

Same problem, do you find a answer ?

Hi friend,

i want ask you, if you could solve this issue ?.