locally: update your android tools through Android SDK Manager by scrolling down to “Extras”. Make sure that all Google Play services/libraries and “Google Repository” are up to date. Then build again.
ionic cloud: wait for an actual fix from team ionic. meanwhile build your APKs locally.
More info on this topic can be found here:
Hi Ionic,
Since the update to the new app-scripts@0.0.39, I have had problems building with ionic package build android --profile prod --release:
You have been opted out of telemetry. To change this, run: cordova telemetry on.
ANDROID_HOME=/usr/local/src/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-8-oracle
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'…
And here:
opened 03:23AM - 08 Nov 16 UTC
closed 08:13PM - 02 Dec 16 UTC
Since the update to the new app-scripts@0.0.39, I have had problems building for… Android with either `ionic package build android --profile dev` or `ionic package build android --profile prod --release`:
```
You have been opted out of telemetry. To change this, run: cordova telemetry on.
ANDROID_HOME=/usr/local/src/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-8-oracle
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-gcm:9.8+.
Searched in the following locations:
https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/maven-metadata.xml
https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/
file:/usr/local/src/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-gcm/maven-metadata.xml
file:/usr/local/src/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-gcm/
file:/usr/local/src/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-gcm/maven-metadata.xml
Required by:
:android:unspecified
* 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: 2.939 secs
Error: Error code 1 for command: /home/package/workspace/apps-abae991f-67/cordova/platforms/android/gradlew with args: cdvBuildRelease,-b,/home/package/workspace/apps-abae991f-67/cordova/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
```
My `config.xml` plugins are below:
```
<plugin name="cordova-plugin-device" spec="~1.1.3"/>
<plugin name="cordova-plugin-console" spec="~1.0.4"/>
<plugin name="cordova-plugin-whitelist" spec="~1.3.0"/>
<plugin name="cordova-plugin-statusbar" spec="~2.2.0"/>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
<plugin name="cordova-plugin-network-information" spec="~1.3.0"/>
<plugin name="phonegap-plugin-push" spec="~1.8.4">
<variable name="SENDER_ID" value="**************"/>
</plugin>
<plugin name="cordova-plugin-splashscreen" spec="~3.2.2"/>
<plugin name="cordova-plugin-camera" spec="~2.2.0"/>
```
The community has [confimed](https://forum.ionicframework.com/t/ionic-package-android-builds-failing/68874/10?u=shinglesmingles) that the issue is with `phonegap-plugin-push` (removing the plugin from `config.xml` builds without error) and that `ionic build android` works fine locally (with updated Google Support Repo).