Error in build ionic framework

5

Gentlemen, I migrated to linux and I have a question / problem.

I already have the android sdk installed with their respective dependencies installed, I squeeze the android command and open the sdk manager normally, I put the environment variables in the file .zshrc (same as .bash_profile):

export ANDROID_HOME=/opt/android-sdk/
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

And even then, when I run the ionic build android, I get the message that is in the photo. Am I forgetting something?

    
asked by anonymous 03.12.2016 / 17:54

2 answers

0

Have the environment variable settings been made in your user profile and not in the root profile? If yes you should use the command: ionic build android with your user and not as root!

    
09.12.2016 / 21:15
0

As Thyago said, if you set the android environment variable on your user, you do not need to use sudo .

Remember that for you to generate the android apk the process must be done in the following order.

-Install android studio

- Set Android environment variable, ANDROID_HOME

-Go into your project directory and enter the command ionic platform add android

-Enter the command ionic build android

    
09.12.2016 / 21:33