Build doesn't seem to work

ionic cordova prepare
cordova prepare
:heavy_check_mark: Running command - done!
Running command: /home/deadsec/Downloads/ionic-preview-app-master/hooks/after_prepare/010_add_platform_class.js /home/deadsec/Downloads/ionic-preview-app-master
add to body class: platform-android

and yes i sdk paths are functional

What of your post is command line output and what is your message?
I see no error in the output - do you get one?
What command exactly are you running?

Also post your ionic info output please.

ionic cordova build android
and i get this error

cordova build android
⠴ Running command [11:37:02] lint finished in 4.66 s
:heavy_multiplication_x: Running command - failed!

[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova build android (exit code 1):

    Running command:
    /home/deadsec/Downloads/ionic-preview-app-master/hooks/after_prepare/010_add_platform_class.js
    /home/deadsec/Downloads/ionic-preview-app-master
    add to body class: platform-android
    Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
    Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to
    valid SDK directory.

ionic info brings up
@ionic/cli-plugin-cordova : 1.6.2
@ionic/cli-plugin-ionic-angular : 1.4.1
@ionic/cli-utils : 1.7.0
ionic (Ionic CLI) : 3.7.0
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.0.2
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.5.3
System:
Node : v8.2.1
OS : Linux 4.4
npm : 5.3.0

It tells you exactly what to do in the error message:

Run cordova requirements to check if it is happy. It won’t work before it is.

tried that and i have installed the missing api but i still get this when i try to build ionic
add to body class: platform-android

Please post the exact command and full, exact error you are getting.

ionic cordova build android

 Running command - done!
Running command: /home/deadsec/Downloads/ionic-preview-app-master/hooks/after_prepare/010_add_platform_class.js /home/deadsec/Downloads/ionic-preview-app-master
add to body class: platform-android
> cordova build android
⠧ Running command [17:33:36]  lint finished in 53.92 s 
✖ Running command - failed!
[ERROR] An error occurred while running cordova build android (exit code 1):

        
        Running command: 
        /home/deadsec/Downloads/ionic-preview-app-master/hooks/after_prepare/010_add_platform_class.js 
        /home/deadsec/Downloads/ionic-preview-app-master
        add to body class: platform-android
        ANDROID_HOME=/usr/lib/android-sdk
        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

Looking at that error message, cordova requirements is not happy. Can you post its output?

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed Google Inc.:Google APIs:23,Google Inc.:Google APIs:22,Google Inc.:Google APIs:21,android-25,android-24,android-23,android-22,android-21
Gradle: not installed
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
Error: Some of requirements check failed

i have gradle installed and it comes up when i do a gradle -v

Gradle 3.4.1

Build time: 2017-03-03 19:45:41 UTC
Revision: 9eb76efdd3d034dc506c719dac2955efb5ff9a93

Groovy: 2.4.7
Ant: Apache Ant™ version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_144 (Oracle Corporation 25.144-b01)
OS: Linux 4.4.0-92-generic amd64

Yeah, but obviously not in a way that the Cordova CLI can understand. Is it’s path in global PATH? Installing Android Studio is often the easier thing to do as it takes care of all of this.