Can't build Android app on Ionic Cloud


#1

I’m building an Android app with Ionic 2 and am having trouble getting it to build using ionic package build android. When I run the command, I get the following output from the packager.

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.919 secs
Error: Error code 1 for command: /home/package/workspace/apps-91d38e33-12/cordova/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/package/workspace/apps-91d38e33-12/cordova/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

#2

Ooph. Looks like it was an issue with Ionic Cloud that’s now fixed. Just re-ran the build and it worked.


#3

I am facing the same issue . I have run it today but issue persist. Can u help me and tell the required information to solve this problem


#4

I hate to say it, but I don’t think I did anything to fix it. It just fixed itself. You could try deleting platforms/android from your project and re-adding it. From other posts I’ve read that seems to work sometimes.