Android build on apps.ionic.io fails


#1

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!


#2

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


#3

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


#4

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…


#5

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: https://forum.ionicframework.com/search?q=ionic%20package%20order%3Alatest_topic (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)


#6

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.


#7

Something new on here?


#8

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