Android build on apps.ionic.io fails

Hello, I am new to Ionic. I am trying to package my build for Android, using Ionic remote build. My project works with “ionic serve” just fine. So then I do: “ionic package build android” and it uploads my project. I go to apps.ionic.io and it shows the build failed, with the following message:

ANDROID_HOME=/opt/android-sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: /opt/android-sdk/tools/templates/gradle/wrapper

When I google this error, it tells me to check my android framework versions - but it is a remote build, so I don’t see how that could help.

Thanks for any help!

1 Like

We’re having this same issue with one of our apps. Unfortunately we haven’t found a solution yet either.

1 Like

http://ionicframework.com/support#support
(Scroll down to “Business and Customer Support”)

1 Like

Are you saying I should Report a Bug?

I just assumed it was something I am doing wrong because I am new to this whole thing…

1 Like

Yes.[quote=“emulcahy, post:4, topic:94302”]
I just assumed it was something I am doing wrong because I am new to this whole thing…
[/quote]

Probably not, Ionic Package is broken in many ways right now it seems: Search results for 'ionic package order:latest_topic' - Ionic Forum (Maybe read through the last x posts too as there might be a solution in them - especially this one here: Ionic Package: Error building in ionic cloud getting error Might need to update your Android SDK - #7 by hamzatrq)

1 Like

Okay thanks! I’ll read through the links to try and fix it, and if I can’t get it working I’ll submit a bug report.

1 Like

Something new on here?

the solutions for me is to substitute ^ with ~ (as found in the link)
<engine name="PLATFORM" spec="~VERSION" />

1 Like