Getting an error while build android

when i try to build android that time showing an error

Error Message

Found com.google.android.gms:play-services-ads:11.0.4, but version 11.0.1 is nee
ded for the google-services plugin.
:processDebugGoogleServices FAILED


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-s
ervices plugin (information about the latest version is available at https://bin
tray.com/android/android-tools/com.google.gms.google-services/) or updating the
version of com.google.android.gms to 11.0.1.

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED

Total time: 3 mins 19.547 secs
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-s
ervices plugin (information about the latest version is available at https://bin
tray.com/android/android-tools/com.google.gms.google-services/) or updating the
version of com.google.android.gms to 11.0.1.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

[ERROR] An error occurred while running cordova build android (exit code 1).

Cli info

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.6
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.9.1
    npm  : 5.5.1
    OS   : Windows 7

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

Please help me anyone how can i fix that.

1 Like

+1 for pointing this Error out. Im getting the same Error and behavior with Firebase Push Notifications. Please someone explain.

Please share your build.gradle dependencies