Supplied javaHome must be a valid directory. You supplied: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home #5171
-
I am trying to run npx cap run android and I am getting this error: Supplied javaHome must be a valid directory. You supplied: /Applications/Android I have this entry in my .bash_profile if I run echo $JAVA_HOME in my terminal this is location of the jdk Anyone have any suggestions on this issue? I have this setting in my android studio Project settings: I am running Android Studio Artic Fox 2020.3.1 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
What's your OS version? Also, in Catalina Apple moved to zsh shell, while you could still use the old one, not sure if that's still possible on Big Sur, so try using the |
Beta Was this translation helpful? Give feedback.
-
@marcarausch I just started getting the same error after upgrading Android Studio - solution for me was to remove the existing Gradle home directory: |
Beta Was this translation helpful? Give feedback.
@marcarausch I just started getting the same error after upgrading Android Studio - solution for me was to remove the existing Gradle home directory:
rm -rf ~/.gradle