I set both ANDROID_HOME and PATH for tools.
my .bashrc
ends with
export PATH="$PATH:/home/toskan/dev/android-sdk-linux/tools:/home/toskan/dev/android-sdk-linux/platforms"
export ANDROID_HOME=/home/toskan/dev/android-sdk-linux
if I echo $PATH
i get
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/toskan/dev/android-sdk-linux/tools:/home/toskan/dev/android-sdk-linux/platforms
if I echo $ANDROID_HOME
I get
$ echo $ANDROID_HOME
/home/toskan/dev/android-sdk-linux
When I run
$ sudo ionic build android
I get
toskan@mycomp:~/IdeaProjects/myappmaster$ sudo ionic build android
Running command: /home/toskan/IdeaProjects/myappmaster/hooks/after_prepare/010_add_platform_class.js /home/toskan/IdeaProjects/myappmaster
add to body class: platform-android
Running command: /home/toskan/IdeaProjects/myappmaster/hooks/after_prepare/020_remove_sass_from_platforms.js /home/toskan/IdeaProjects/myappmaster
Running command: /home/toskan/IdeaProjects/myappmaster/platforms/android/cordova/build
[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.]
ERROR building one of the platforms: Error: /home/toskan/IdeaProjects/myappmaster/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/toskan/IdeaProjects/myappmaster/platforms/android/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134: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)
ANDROID_HOME
is set and the command in the commandline
android
opens the android package manager
what am I missing?