Ionic package - Android build error

Hi friends, today i send a build to package with the command:

ionic package build android

And i’m getting an error on output:

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

A week ago it was working. (Ios builds are working)
Any suggestion?

Searching for the error message in the forum will give you lots of threads where solutions were posted.

Related issues In ionic package service?
Local, i can build normally…

Yes, this for example:

@Sujan12, solved the problem with:

cordova platform update android@6.2.3 --save

Thanks!!!

The solution did not work for me. Any other tips?

Edit: got it to work by also changing the config.xml.

Complete solution is to:

cordova platform update android@6.2.3 --save

then update ''config.xml´´

< engine name=“android” spec=“~6.2.3” />