I am trying to Run Appium on MAC OS Mojave. To see if my configuration is good I am using Appium Doctor. It shows my ANDROID_HOME and JAVA_HOME is not set.
Once I set them in ~/.profile Appium Doctor shows all green that is everything is good.
Now the problem is every time I want to create new Appium Session or I close the terminal, then every-time I need to run "source ~/.profile" Previously the setup was working fine.
How to solve this problem?
Two Solution worked for me :
1st
Create Environment variable like Java_home and Android_Home in the IDE itself like if you are using intelliJ refer: Setting up and using environment variables in IntelliJ Idea
2nd
Create a new file ~/.zprofile
Type there source ~/.bash_profile
Save and close
Now the environment should be saved in the profile and Appium configuration should be saved automatically