Ionic Package: Could not find gradle wrapper within Android SDK

please help me in android build not working i have correct key file i checked it by manually signing in android build its giving this error

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

Also on Ionic Package?

Post your ionic info output please.

global packages:

@ionic/cli-utils : 1.4.0
Ionic CLI        : 3.4.0

System:

Node       : v6.11.0
OS         : Windows 8.1
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 3.10.10

In your project directly of the project that is not working, please. This one is missing information.

global packages:

@ionic/cli-utils : 1.4.0
Gulp CLI         : not installed globally
Ionic CLI        : 3.4.0

local packages:

@ionic/cli-plugin-gulp   : 1.0.2
@ionic/cli-plugin-ionic1 : 2.0.1
Ionic Framework          : ionic1 1.3.3

System:

Node       : v6.11.0
OS         : Windows 8.1
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 3.10.10

Did you add the android platform locally?
Run cordova platform list please.
What command are you using to build in Ionic Package?

$ ionic package build android --profile newtest

$ cordova platform list
Installed platforms:
android 5.2.2
Available platforms:
amazon-fireos ~3.6.3 (deprecated)
blackberry10 ~3.8.0
browser ~4.1.0
firefoxos ~3.6.3
webos ~3.7.0
windows ~4.4.0
wp8 ~3.8.2 (deprecated)

yes i have added android platform

This is old and should be upgraded.

Run ionic cordova platform list please.

how can i update tell me command
and what about ios build issue ?

I can’t tell you as your ionic info didn’t include Cordova data.
Run ionic cordova platform list please. Then ionic info again.

(If this doesn’t work and return a Cordova CLI verison, please run cordova -v)

That is a seperate topic, please don’t mix.

ionic cordova platform list returning same information
$ cordova -v
6.5.0

You need the current version of Cordova, 7.0.1. Uninstall and reinstall Cordova. (npm uninstall cordova -g, npm install -g cordova)
Then remove and readd the android platform again. (ionic cordova platform remove android, ionic cordova platform add android)

2 posts were split to a new topic: Ionic Package problem

3 posts were split to a new topic: Ionic Package: 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