Environment
Install all software needed to run the project.
info
- This guide assumes you are using macOS.
- When seeing this character
~
at the start of the line, you should read it as the expected outcome of the command you should run.
Installing Xcode
Install Xcode from the AppStore or Apple Developer.
Installing Android Studio
Install using brew
brew install android-studio
or download from Android Developer.
Installing Java
For running Android apps you need Java. We recommend using the Java version that comes with Android Studio.
We will add the path to Java binaries to the ~/.zshrc
file. To do it run:
echo 'export PATH="/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Validate that Java is working by running:
java --version
You should see something like this:
~ openjdk version "17.0.9" 2023-10-17
~ OpenJDK Runtime Environment Homebrew (build 17.0.9+0)
~ OpenJDK 64-Bit Server VM Homebrew (build 17.0.9+0, mixed mode, sharing)
Also confirm the path to Java executable is associated with Android Studio
which java
You should see something like this:
~ /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
Now we need to link the place where Xcode tries to find Java to the one we just installed. To do it run:
sudo ln -sfn /Applications/Android\ Studio.app/Contents/jbr /Library/Java/JavaVirtualMachines/jbr
warning
Avoid installing Java with brew to prevent issues with different version of Java when working within Android Studio and Xcode