Android studio and linux

Android Studio – A Powerful IDE for Building Apps for All Android Devices

Android Studio, Android’s official IDE, is a powerful and popular, feature-rich IDE for building apps for all Android compatible devices. It is specifically designed for Android platform to speed up building of apps and help users develop top-quality, reliable and efficient apps from scratch, for every type of Android device.

Android Studio Features:

  • It runs instantly
  • Has a fast and feature-rich emulator.
  • Provides an intelligent code editor.
  • It is designed for teams.
  • It is also optimized for all Android devices.
  • Provides code templates as well as sample apps.
  • Offers testing tools and frameworks.
  • Has C++ and NDK support.
  • Supports firebase and cloud integration.
  • Provides GUI tools such as layout editor, APK analyzer, vector asset studio and translation editor and much more.

Requirements:

  • 64-bit distribution that also run 32-bit applications.
  • Desktop environment: GNOME or KDE, but most desktops should work.
  • GNU C Library (glibc) 2.19 or newer.
  • At least 2 GB of available disk space, but 4 GB Recommended (500 MB for IDE + 1.5 GB for Android SDK and emulator system image).
  • At least 3 GB RAM, but 8 GB RAM recommended, the Android Emulator consumes 1 GB of RAM.
  • At least 1280 x 800 screen resolution.

How to Install Android Studio in Linux Systems

First, you need to download Android Studio package for Linux. Accept the terms and conditions before you can access the download link, as shown in the screenshot below.

Download Android Studio for Linux

Alternatively, you can use wget command to download the Android Studio package from your terminal, then unpack the Android Studio distribution archive and move into the extracted directory, as follows

$ cd Download $ unzip android-studio-ide-173.4670197-linux.zip $ cd android-studio/ $ ls

Android Studio Files

To launch Android Studio, navigate to the android-studio/bin/ directory, and execute studio.sh. This application initializer script will create several configuration files in the ~/.AndroidStudio3.1 directory.

Once you run script, it will ask you to import previous Android Studio settings or not, then click OK.

Читайте также:  Sorting files by size linux

Run Android Studio in Linux

After the applications download and loads a number of components, you will see the setup wizard shown in the screen shot below. Click Next to proceed.

Android Studio Setup Wizard

Next, select the type of installation you want and click Next.

Android Studio Installation Type

Then, choose a UI theme and click Next.

Android Studio UI Theme

Now verify settings and click Next to continue.

Android Studio Settings

At this point, you should check emulator settings and click Finish to complete the setup process.

Android Studio Emulator Settings

Next, the application will download several components as shown. Once all the necessary components have been downloaded, your Android studio will be up to date. Click Finish to start using Android Studio.

Android Studio Components

Now create your first project or open an existing one.

Create New Android Studio Project

For example, if you choose to start a new project (a mobile phone app), define its settings as shown below and click Next.

Create Android Project

Then select the form factor and minimum SDK for your app and click Next.

Target Android Devices

Next, choose an activity for mobile and click Next to continue.

Add Activity to Mobile

Afterwards, create a new basic activity with an app bar. Then click Next to continue.

Configure Activity

Then the application will install the requested components, one it has done that, click on Finish.

Install Android Studio Components

Next, the application will also build the gradle project info for your app, as shown, this may take a few minutes.

Building App Gradle Project

After building the gradle project info, you should be set, you can now work on your project.

Main App Activity View XML App View in Android Studio

Conclusion

Android Studio is a powerful and feature-rich IDE for building apps for all android compatible devices. It offers the fastest tools for building apps, and most importantly, it is Android’s official IDE. Use the comment from below to share your thoughts or queries about it, with us.

Источник

Installing Android Studio On Ubuntu 22.04: Complete Guide

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

  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.
Читайте также:  Какая команда linux создает файл

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.

$ 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:

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

Читайте также:  Broadcom linux bluetooth drivers

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:

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:

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

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.

Источник

Оцените статью
Adblock
detector