Set ANDROID_HOME environment variable in mac

后端 未结 17 831
梦谈多话
梦谈多话 2020-12-04 07:36

I am new in developing native app using Salesforce SDK. I tried to create android project from command line using forcedroid tool but there is problem in setting environment

17条回答
  •  佛祖请我去吃肉
    2020-12-04 08:00

    Based on Abraham Mayowa Oluwasina answer provided above is the correct one. MacOS Catalina, .bash_profile is no longer apple's default shell and it won't persist your path variables instead use .zprofile instead.

    In root directory,

    touch .zprofile
    open -e .zprofile
    

    Add the following in file,

    export ANDROID_HOME=/Users//Library/Android/sdk
    export PATH=$PATH:$ANDROID_HOME/platform-tools
    

    Save and exit

    To activate

    source ~/. zprofile
    

    echo $ANDROID_HOME

提交回复
热议问题