I want to build an ionic app but when I run ionic build android
on terminal it gives below error,
Running command: /home/shamil/learn/Ionic/myApp/hooks/after_prepare/010_add_platform_class.js /home/shamil/learn/Ionic/myApp
add to body class: platform-android
Running command: /home/shamil/learn/Ionic/myApp/platforms/android/cordova/build
[Error: 'ANDROID_HOME' environment variable is set to non-existent path: /Android/Sdk
Try update it manually to point to valid SDK directory.]
ERROR building one of the platforms: Error: /home/shamil/learn/Ionic/myApp/platforms/android/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /home/shamil/learn/Ionic/myApp/platforms/android/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
I have given the correct path where sdk exist, but why there such an error exist? I have searched enough to solve this matter, but it still gives the same error.
Please help.