三种方法:Installing Android Studio On Ubuntu 22.04: Complete Guide

25 篇文章 1 订阅

How to Install Android Studio on Ubuntu?  https://www.geeksforgeeks.org/how-to-install-android-studio-on-ubuntu/

1. From The Ubuntu Software Centre

2. Using The Snap Tool

3. Install Android Studio Using Repository

4. Using the Zip File

How to Install Android Studio on Ubuntu 24.04, 22.04 or 20.04  https://linuxcapable.com/how-to-install-android-studio-on-ubuntu-linux/ 

Installing Android Studio On Ubuntu 22.04: Complete Guide  https://dev.to/janetmutua/installing-android-studio-on-ubuntu-2204-complete-guide-1kh8 

Android Studio 3.1.4,在Ubuntu 18.04上安装它的三种方法  https://ubunlog.com/zh-CN/Android-Studio-Ubuntu%E5%AE%89%E8%A3%85/#google_vignette    

ubuntu安装安卓开发环境(android studio)  https://blog.csdn.net/qq_27149279/article/details/119054332 

Android Studio 3.1.4,在Ubuntu 18.04上安装它的三种方法  https://ubunlog.com/zh-CN/Android-Studio-Ubuntu%E5%AE%89%E8%A3%85/ 

 

Installing Android Studio On Ubuntu 22.04: Complete Guide

  https://dev.to/janetmutua/installing-android-studio-on-ubuntu-2204-complete-guide-1kh8 

Are you new to Android Development? And do you want to learn how to setup your Integrated Development Environment (IDE) for building your projects? Then you are in the right place!

Android Studio is the official IDE for developing Android apps. It comes with powerful features that help you build your applications faster and easier.

For Linux users, this guide will take you through the nitty gritty of getting your IDE setup. Let's get started!

System Requirements

Since we are setting up on Linux, here are the system requirements as listed on the Official download page for Android Studio:

  1. x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3.

  2. Any 64-bit Linux distribution that supports Gnome, KDE, or Unity DE; GNU C Library (glibc) 2.31 or later.

  3. A minimum 8 GB of available disk space for your IDE, Android SDK and the Android Emulator.

  4. 8 GB RAM or more.

  5. 1280 x 800 minimum screen resolution.

If your computer meets these requirements then let's get started with the installations.

Method 1:Manually Installing Android Studio (From the Official & PPA Repositories)

Installing From the Official Repository

You can install Android Studio from the official repository. To begin, open up your terminal and then update and upgrade your APT repository by running the command below:

$ sudo apt update
$ sudo apt upgrade

Then install OpenJDK, a free and open-source implementation of the Java platform, Standard Edition (Java SE). To do so run:

$ sudo apt install openjdk-18-jdk

Now you can proceed to install your IDE by downloading a zip file of the latest version of Android studio on your machine.

At the time of writing this article, the latest version of Android Studio is the Electric Eel version. Run:

$ wget https://dl.google.com/dl/android/studio/ide-zips/2022.1.1.21/android-studio-2022.1.1.21-linux.tar.gz

or you can check for the version you want from the Android Studio Download archive

After successful download, you need to unpack the downloaded zip file with:

$ tar -zxvf android-studio-2022.1.1.21-linux.tar.gz

Then move the android-studio folder to /opt/ using:

$ sudo mv android-studio /opt/
$ sudo ln -sf /opt/android-studio/bin/studio.sh /bin/android-studio

Once you have run these commands, you will write a snippet of code to allow for the Android Studio application to be available on the application menu shortcut on Ubuntu.

Using this command:

$ sudo nano /usr/share/applications/android-studio.desktop

Add the following code snippet and save:

[Desktop Entry]
Version=1.0
Type=Application
Name=Android Studio
Comment=Android Studio
Exec=bash -i "/opt/android-studio/bin/studio.sh" %f
Icon=/opt/android-studio/bin/studio.png
Categories=Development;IDE;
Terminal=false
StartupNotify=true
StartupWMClass=jetbrains-android-studio
Name[en_GB]=android-studio.desktop

From there you can open and run your android studio from the activities or on the applications menu.

Uninstalling Android Studio - Official Repository

If you installed Android Studio from the Official repository, run the following commands to uninstall the IDE:

$ sudo rm /usr/share/applications/android-studio.desktop
$ sudo rm -r /usr/bin/android-studio
$ sudo rm -rf /opt/android-studio
$ rm -rf ~/android-studio-2022.1.1.21-linux.tar.gz

This will completely uninstall all the packages that were installed.

Installing Android Studio From the PPA Repository

You can also get your IDE from the PPA repository - an Ubuntu based software repository. To begin install OpenJDK:

$ sudo apt install openjdk-18-jdk

Check to see the java version installed above:

$ java -version

Then import PPA and update your APT repository using:

$ sudo add-apt-repository ppa:maarten-fonville/android-studio
$ sudo apt update

Once complete, you can install Android Studio through:

$ sudo apt install android-studio -y

Uninstalling Android studio - PPA repository

If you need to remove Android Studio from your machine, run:

$ sudo apt autoremove android-studio --purge -y

Then remove the imported PPA using:

$ sudo add-apt-repository --remove ppa:maarten-fonville/android-studio -y

With this, Android Studio and all the installed packages will have been removed completely

Method 2: Installing Android Studio Using Snap

Another way you can use to install Android Studio is by using Snap - a package management system by Canonical. To do so, first run:

$ sudo apt install snapd

Then install OpenJDK and Android Studio using:

$ sudo apt install openjdk-18-jdk
$ sudo snap install android-studio --classic

Once done, proceed to launch Android Studio by running:

$ android-studio

Uninstalling Android Studio - Snap

Removing Android Studio installed using snap is quite easy. You simply need to run:

$ sudo snap remove android-studio

   

Method 3: Installing Android Studio Using JetBrains Toolbox

The third method you can use to install Android Studio is by using the Toolbox app which gives you access to developer products made by Jetbrains.

If you don't know how to install Toolbox, here is a guide on how to.

Once you have Toolbox on your machine, click to open it, then select Android Studio and click install. You will get the latest version of the IDE installed in your machine.

Download Android Studio


If you prefer to install a specific version of Android Studio, you can check the available versions and install the one you prefer.

Android Studio Versions

Uninstalling Android Studio - Jetbrains Toolbox

To remove Android Studio just open the Toolbox App and click the menu button adjacent to Android Studio option to see an uninstall option.

This will remove Android Studio and all the packages that were installed with it.

With that, you can select whichever method suits you and get your IDE setup.

Bonus Tip: Using Wakatime For Your Coding Productivity!

Enhancing your productivity while coding means that you can get more done and build better software. One such plugin that can increase your productivity is Wakatime.

Wakatime is used for time tracking meaning you can manage and analyze how much time you spend coding daily. In the spirit of building in public, Wakatime can help you share your metrics on Twitter or LinkedIn.

What's more, you can include your programming metrics on your Markdown file on Github. Once you have installed Android Studio, head over to Settings/plugins and search for Wakatime.

Install it and restart your IDE, then go ahead and change the world one minute at a time!

References

Android Studio download archives
Latest version of Android Studio
Ubuntu-Server.com

Conclusion

In this guide we have covered three ways of installing the Android Studio IDE. Properly setting up your IDE allows you to develop your applications smoothly with no bumps. I hope this article has been of help to you.

Follow me on Twitter and Medium for more tutorials and guides.

Keep building! 🌟

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值