I am a beginner in mobile development and was studying IONIC, when I was trying to generate the test project apk gave the following error:
WARN: ionic.project has been renamed to ionic.config.json, please rename it Running command: /home/lupum/Documents/testeionic/hooks/after_prepare/010_add_platform_class.js / home / lupum / Documents / testeionic
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 updating your 'PATH' to include path to valid SDK directory.
I ran the command:
sudo ionic build android
And before that:
sudo cordova platform add android
I've been looking for ways to solve and I've found some that talked about changing the PATH from where I found ANDROID.
I ran the following commands:
export ANDROID_HOME=/</usr/local/android-studio/>/android-sdk-linux
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Because my android found in: /usr/local/android-studio/
And the android platform at: ~/Android/Sdk/platform-tools$
Through this article: link
The problem persists.
I would appreciate it if I could help.
Hello everyone, these are my directories, what would be the correct way to set them in path?