A few days I installed Fededora 24, with everything completed I installed Ionic and Cordova, and soon after the JDK. When you give the following command ionic build android
I checked that the SDK was missing, I installed it normally, but when I ran the command again I got the following error:
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Running command: /home/omestre/IonicProjects/ionicTask/hooks/after_prepare/010_add_platform_class.js /home/omestre/IonicProjects/ionicTask
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.
I have tried to change my file bashrc
and nothing solves, it follows the file:
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export NVM_DIR="/root/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
export PATH=$PATH:/Android/Sdk/tools:/opt/Android/Sdk/platform-tools:/Android/Sdk/tools/bin
export PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/omestre/.local/bin:/home/omestre/bin:/Android/Sdk/tools:/An$
export PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/omestre/.local/bin:/home/omestre/bin:/Android/Sdk/tools:/An$
export PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/omestre/.local/bin:/home/omestre/bin:/opt/Android/Sdk/tools$
export PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/omestre/.local/bin:/home/omestre/bin:/Android/Sdk/tools:/op$
export PATH=$PATH:/opt/Android/Sdk/tools:/opt/Android/Sdk/platform-tools:/opt/Android/Sdk/tools/bin