Archives For November 30, 1999

 

This simple tutorial shows how to install the latest Android Studio 2023.1.1 or 2023.2.1 in Ubuntu 22.04, Ubuntu 23.10.

Android Studio, the official IDE for Android app development, is easy to install in Ubuntu in different ways! They include Snap, Flatpak, and official tarball.

Method 1: Install Android Studio via Snap package

The easiest way to install the IDE is using the Snap package, which however run in sandbox.

Simply launch Ubuntu Software (or App Center for 23.10), then search & install Android Studio:

Method 2: Install Android Studio via Flatpak package

The IDE is also available to install as Flatpak package, which also runs in sandbox.

Linux Mint 21 users may simply search for & install it from “Software Manager”.

Install Android Studio as Flatpak in Linux Mint

And, Ubuntu users in favor of Flatpak can install the package, by running 2 commands in terminal (Ctrl+Alt+T) one by one:

  • Install the Flatpak daemon:
    sudo apt install flatpak
  • Install Android Studio as Flatpak package:
    flatpak install https://dl.flathub.org/repo/appstream/com.google.AndroidStudio.flatpakref

Method 3: Install Android Studio via Official Tarball

For those who don’t like running apps in sandbox, Android website provides official tarball for Linux.

Option 1: Use Ubuntu PPA

The tarball does NOT include app menu integration. Without doing the job manually, there’s an Ubuntu PPA contains script to automatically download the tarball and create app shortcut for it.

It’s a trustworthy PPA repository maintained by Maarten Fonville, a member of Ubuntu Users and KUbuntu Testers teams.

1. First, press Ctrl+Alt+T on keyboard to open terminal. When terminal opens, run command to add the PPA:

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

Type user password when it asks (no asterisk feedback) and hit Enter to continue.

2. After adding PPA, Linux Mint user need to manually refresh system cache, though it’s done automatically now in Ubuntu.

sudo apt update

3. Finally, install the package:

sudo apt install android-studio

The PPA contains installer for multiple versions of the IDE. Besides installing the latest stable, you may also paste the last command into terminal and hit “Tab” to list other choices. For example, install the 2023.2.1 from Canary channel via command:

sudo apt install android-studio-2023.2.1

As mentioned above, the PPA package will automatically download the tarball from the official download link, install it, and create app menu integration for you.

When done, simply search for and launch the IDE from start menu, application menu, or ‘Activities’ overview depends on your Desktop environment.

Option 2: Manually download & install the tarball

If you don’t trust any third-party sources, simply go to Android website via the link below and click download the tarball.

Then, extract the tarball, and move the sub-folder to anywhere as you want for long time use.

To create app shortcut from launching Android Studio from start menu:

  • First launch text editor and add following lines to an empty file:
    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=false
    Name=Android Studio
    Comment=Integrated Android developer tools for development and debugging.
    Exec=/path/to/studio.sh
    Icon=/path/to/studio.svg
    Categories=GNOME;GTK;Development;IDE;
  • Replace /path/to/studio.sh and /path/to/studio.svg according where you save the source folder. Press Ctrl+L in that folder to quickly copy the PATH.
  • Finally, save the file to .local/share/applications as name android-studio.desktop

If everything’s done properly, you should be able to launch it from your system main menu.

Uninstall Android Studio

Depends on how you installed the package, remove the IDE by:

  • For the Snap package, simply remove from Ubuntu Software.
  • For Flatpak package, open terminal and run command:
    flatpak uninstall --delete-data com.google.AndroidStudio

    Also run flatpak uninstall --unused to remove useless run-times.

  • For Ubuntu PPA package, run command:
    sudo apt remove --autoremove android-studio*

If you downloaded & installed the tarball manually, then just remove the source folder as well as .desktop shortcut file under .local/share/applications directory.

Android Studio 4.0 was released a day ago. Here’s how to install it in Ubuntu 18.04, Ubuntu 19.10, Ubuntu 20.04.

Android Studio 4.0 features a new Motion Editor, improved Layout Inspector, Clangd support for C++, smart editor features, enhancements to the CPU Profiler, Java 8 language library desugaring in D8 and R8, and much more other changes. See the release note for more.

How to Install Android Studio 4.0 in Ubuntu:

The containerized Snap package is available to install in Ubuntu Software for Ubuntu 18.04 and higher:

Don’t like Snap application? You can also install Android Studio 4.0 easily via Ubuntu Make.

1.) Install the latest Ubuntu Make:

  • Open terminal (Ctrl+Alt+T) and run command to add the PPA which contains the latest Ubuntu Make packages for Ubuntu 16.04, Ubuntu 18.04, Ubuntu 19.10, and Ubuntu 20.04.
    sudo add-apt-repository ppa:lyzardking/ubuntu-make

  • Then install or upgrade Ubuntu Make via command:
    sudo apt update && sudo apt install ubuntu-make

  • 2.) Install Android Studio via command:

    umake android --accept-license

    It automatically downloads the software package and dependencies from Google and installs on your system for single use by default.

    3.) Once installed, launch the IDE from ‘Show Applications’ menu. Restart you machine if you don’t see the icon, or run sh ~/.local/share/umake/android/android-studio/bin/studio.sh command to launch it from terminal.

    Uninstall:

    You may remove Ubuntu Make PPA by running command:

    sudo add-apt-repository --remove ppa:lyzardking/ubuntu-make

    And remove Android Studio via command:

    umake android --remove

    Android Studio IDE 3.1 was released a few days ago. Here’s how to install it in Ubuntu 16.04, Ubuntu 17.10, Ubuntu 18.04 easily via Snap package.

    Android Studio 3.1 introduced a C++ performance profiler for trying to analyze CPU bottlenecks in application code. It also adds lint checks for the Kotlin programming language, SQL code completion support, D8 is now the default Dex compiler, a new build output window, and other enhancements.

    The community has built the IDE into snap, the universal Linux package format, that can be easily installed on all current Ubuntu releases.

    1. For Ubuntu 14.04 and Ubuntu 16.04 users never installed a snap package, you need to install the snapd daemon while it’s not shipped by default in the two LTS.

    Open terminal either via Ctrl+Alt+T or by searching ‘terminal’ from app launcher. When it opens, run command:

    sudo apt-get install snapd snapd-xdg-open

    2. Then launch Ubuntu Software, search for and install Android Studio.

    For those who prefer command console, run command in terminal to install the snap:

    snap install android-studio --classic

    Once installed, launch the Android IDE from your application launcher (log out and log in back if you don’t see the app icon) and enjoy!

    Android Studio reached the new major 3.0 release. Here’s how to install it in Ubunu 14.04, Ubuntu 16.04, Ubuntu 17.10.

    Android Studio 3.0 features:

    • Ability to develop apps with Kotlin, a newer programming language designed to interoperate with existing Java code
    • An SDK for creating Instant Apps
    • New templates for Android Things applications, XML and downloadable fonts for Android 8.0 and higher
    • A new wizard for creating adaptive icons.
    • Android Plugin for Gradle 3.0.0 with significant performance improvements to large multi-module projects.
    • Ability to create Android 8.0 emulators with the Google Play Store pre-installed

    How to Install Android Studio 3.0 in Ubuntu:

    You can easily install it either via Maarten Fonville’s PPA or by using Ubuntu Make in Ubuntu 14.04, Ubuntu 16.04, Ubuntu 17.04, and Ubuntu 17.10.

    The Maarten Fonville’s PPA contains installer script that automatically downloads Linux package from Google, and installs it into /opt/ for global use.

    1. Open terminal via Ctrl+Alt+T and run command to add the PPA:

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

    Input your password (no visual feedback while typing) when it prompts and hit Enter.

    2. Then update and install the IDE via commands:

    sudo apt-get update
    
    sudo apt-get install android-studio

    To install Android Studio 3.0 via Ubuntu Make, you need to first install the latest Ubuntu Make from this PPA. Then run command to install the IDE after accepting license.

    umake android

    Quick tutorial shows you how to install Android Studio, a new Android development environment developed by Google and based on IntelliJ IDEA, via PPA in Ubuntu 14.10, Ubuntu 14.10, Ubuntu 12.04 and the next Ubuntu 15.04.

    Similar to Eclipse with the ADT Plugin, Android Studio provides integrated Android developer tools for development and debugging.

    On top of the capabilities you expect from IntelliJ, Android Studio offers:

    • Gradle-based build support.
    • Android-specific refactoring and quick fixes.
    • Lint tools to catch performance, usability, version compatibility and other problems.
    • ProGuard and app-signing capabilities.
    • Template-based wizards to create common Android designs and components.
    • A rich layout editor that allows you to drag-and-drop UI components, preview layouts on multiple screen configurations, and much more.
    • Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine as server-side components.

    Install Android Studio via PPA in Ubuntu:

    Installing Android Studio in Ubuntu becomes easy. A Ubuntu PPA contains simple script that automatically downloads and installs the latest release from Google download server. So far, Ubuntu 15.04, Ubuntu 14.10, Ubuntu 14.04, and Ubuntu 12.04 are supported.

    1. Android Studio depends on Java, and Oracle Java 7 or 8 is recommended. Press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the commands below one by one:

    sudo add-apt-repository -y ppa:webupd8team/java
    
    sudo apt-get update
    
    sudo apt-get install oracle-java7-installer oracle-java7-set-default

    2. To add the Android Studio PPA, run the command:

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

    Then update package lists and install the script:

    sudo apt-get update
    
    sudo apt-get install android-studio

    Depends on your internet connection, it takes a few minutes downloading the source package.

    Once installed, start the setup wizard from the Unity Dash (may need restart), or just run command /opt/android-studio/bin/studio.sh.

    via: github