Ionic android build Error - Failed to find 'ANDROID_HOME' environment variable

前端 未结 12 1474
庸人自扰
庸人自扰 2020-12-23 19:41

I am trying to build android for ionic in linux but its showing me an error like this

     [Error: Failed to find \'ANDROID_HOME\' environment variable. 
           


        
12条回答
  •  别那么骄傲
    2020-12-23 20:02

    The procedure is already well explained in the above answers. But if add the ANDROID_HOME and PATH to the .bashrc or .zshrc present in /home/username/ and try to run the ionic command with sudo, you may get this error again.

    The reason is, it may look for the ANDROID_HOME and PATH in the .zshrc file of root user instead of currently logged in user. So you shouldn't do that unless you add that in root user's .bashrc or .zshrc files.

提交回复
热议问题