Ionic package android fails in Ionic website


#1

Hey,

When I upload a new version to ionic I get this output:

ANDROID_HOME=/usr/local/src/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-8-oracle
Error: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle 
in your path, or install Android Studio

I don’t know what to do anymore, I tried everything!
the command I execute is:

ionic package build android --profile profile --release --prod

This is my packages.json:

{
    "name": "...",
    "version": "1.0.24",
    "author": "...",
    "homepage": "...",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "dependencies": {
        "cordova-android": "~6.2.3",
        "cordova-plugin-app-version": "~0.1.9",
        "cordova-plugin-compat": "~1.1.0",
        "cordova-plugin-device": "~1.1.6",
        "cordova-plugin-geolocation": "~2.4.3",
        "cordova-plugin-google-analytics": "~1.8.2",
        "cordova-plugin-splashscreen": "~4.0.3",
        "cordova-plugin-whitelist": "~1.3.2"
    },
    "devDependencies": {
        "@ionic/cli-plugin-cordova": "~1.3.0",
        "@ionic/cli-plugin-ionic1": "~1.3.0",
        "browser-sync": "~2.18.12",
        "chalk": "~1.1.3",
        "cordova": "~6.5.0",
        "del": "~2.2.2",
        "elementtree": "~0.1.7",
        "eslint": "~3.19.0",
        "gulp": "~3.9.1",
        "gulp-angular-filesort": "~1.1.1",
        "gulp-angular-templatecache": "~2.0.0",
        "gulp-autoprefixer": "~3.1.1",
        "gulp-changed": "~2.0.0",
        "gulp-csso": "~2.0.0",
        "gulp-eslint": "~3.0.1",
        "gulp-filter": "~5.0.0",
        "gulp-htmlmin": "~3.0.0",
        "gulp-if": "~2.0.2",
        "gulp-imagemin": "~3.3.0",
        "gulp-inject": "~4.2.0",
        "gulp-jsonlint": "~1.2.0",
        "gulp-load-plugins": "~1.5.0",
        "gulp-natural-sort": "~0.1.1",
        "gulp-ng-annotate": "~2.0.0",
        "gulp-plumber": "~1.1.0",
        "gulp-protractor": "~3.0.0",
        "gulp-rename": "~1.2.2",
        "gulp-rev": "~7.1.2",
        "gulp-rev-replace": "~0.4.3",
        "gulp-sass": "~3.1.0",
        "gulp-shell": "~0.6.3",
        "gulp-size": "~2.1.0",
        "gulp-sourcemaps": "~2.6.0",
        "gulp-uglify": "~2.1.2",
        "gulp-useref": "~3.1.2",
        "jasmine-spec-reporter": "~3.3.0",
        "karma": "~1.7.0",
        "karma-angular-filesort": "~1.0.2",
        "karma-jasmine": "~1.1.0",
        "karma-ng-html2js-preprocessor": "~1.0.0",
        "karma-phantomjs-launcher": "~1.0.4",
        "karma-spec-reporter": "~0.0.30",
        "lodash": "~4.17.4",
        "main-bower-files": "~2.13.1",
        "minimist": "~1.2.0",
        "phantomjs-prebuilt": "~2.1.14",
        "plist": "git://github.com/akofman/plist.js.git#3f256fd21ab3ad3ada0f491cfc905098a2631342",
        "proxy-middleware": "~0.15.0",
        "require-dir": "~0.3.2",
        "vinyl-paths": "~2.1.0",
        "wiredep": "~4.0.0",
        "xml2js": "~0.4.17",
        "yeoman-test": "~1.6.0"
    },
    "description": "...",
    "cordovaPlugins": [
        "cordova-plugin-app-version@~0.1.9",
        "cordova-plugin-device@~1.1.6",
        "cordova-plugin-geolocation@~2.4.3",
        "cordova-plugin-google-analytics@~1.8.2",
        "cordova-plugin-splashscreen@~4.0.3",
        "cordova-plugin-whitelist@~1.3.2",
	"cordova-plugin-compat@~1.1.0"
    ],
    "cordova": {
        "plugins": {
            "cordova-plugin-whitelist": {},
            "cordova-plugin-device": {},
            "cordova-plugin-app-version": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-google-analytics": {},
            "cordova-plugin-geolocation": {},
            "cordova-plugin-compat": {}
        },
        "platforms": [
            "android"
        ]
    }
}

#2

https://ionicframework.com/support#support
(Scroll down to “Business and Customer Support” and report this issue)