Ionic package and play-services-ads

Hi, I have a App which uses the cordovaPlugins cordova-plugin-admobpro. When I try to run package I get the following error:

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

Could not resolve all dependencies for configuration ‘:_debugCompile’.
Could not find any version that matches com.google.android.gms:play-services-ads:+.
Searched in the following locations:
https://repo1.maven.org/maven2/com/google/android/gms/play-services-ads/maven-metadata.xml
https://repo1.maven.org/maven2/com/google/android/gms/play-services-ads/
file:/usr/local/src/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/maven-metadata.xml
file:/usr/local/src/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/
Required by:
:android:unspecified

How to fix this?

Hi, i had the same problem and resolved with the commands:

android list sdk
android update sdk --no-ui --filter extra 

bug: PushPlugin makes Android build fail every time

Good luck!