my second title summary my second title summary my second title summary my second title summary my second title summary my second title summary my second title summary my second title summary my second title summary my second title summary my second title summary my second title summary my second title summary my second title summary
10 min read
Download Android Studio from here
Unzip the tar file with:
tar -xvf <file-name>.tag.gz
Inside the android-studio
directory, you can open Android Studio from android-studio/bin/studio.sh
You can put the android-studio
directory anywhere, or you can make it system-wide by putting it in the /otp
directory as ChatGPT suggested.
sudo mv android-studio /otp/android-studio
Then you will need to add the android studio binaries to your env variables.
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
Add a .desktop
file for android studio
sudo vim /usr/share/applications/android-studio.desktop
Then add the following content:
[Desktop Entry]
Version=1.0
Type=Application
Name=Android Studio
Exec=/opt/android-studio/bin/studio.sh
Icon=/opt/android-studio/bin/studio.png
Terminal=false
Categories=Development;IDE;
Refresh desktop
update-desktop-database
It's required to compile and run apps on the emulator
Install it with:
sudo apt install openjdk-17-jdk -y
Or you can download it from adoptium as shown i react native docs
You can change jdk version with:
sudo update-alternatives --config java
Then you can set the JAVA_HOME
environment variable based on where the jdk located.
To see jdk 17 location run:
sudo update-alternatives --display java
Then set this location in your env
export JAVA_HOME=<path-to-jdk>
export PATH=$JAVA_HOME/bin:$PATH