How to install Android Studio on Ubuntu?

前端 未结 17 1248
情深已故
情深已故 2020-11-30 20:38

I have to install Android Studio on Ubuntu and I have used this link to download Android Studio.

Is there any easy way to install Studio on Ubuntu?

相关标签:
17条回答
  • 2020-11-30 20:41

    add a repository,

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

    Then install using the command below:

    sudo apt-get install android-studio
    
    0 讨论(0)
  • 2020-11-30 20:42

    Below are the steps to install Android Studio in Ubuntu system:

    1. Install JDK 6 or later

    First, install Oracle JDK 8 (although you could also choose OpenJDK but it has some UI/performance issues) using WebUpd8 PPA.

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

    To make sure, it’s installed successfully, open a terminal and type (you should get the version number of the jdk you’ve installed e.g javac 1.8.0_11)

    javac -version
    

    2. Download and install Android Studio

    Download the Android Studio package for Linux and extract it somewhere (e.g home directory). Then type :

    cd android-studio/bin
    ./studio.sh
    

    3. Install SDK Platforms

    You need to install some SDK before you jump into building android apps. Click on Configure -> SDK Manager to open Android SDK Manager. Select the latest API (to test against target build, e.g API 19 (Android 4.4.2)) and some packages in Extras (Android Support Library and Android Support Repository). Then install the selected packages.

    0 讨论(0)
  • 2020-11-30 20:47

    Android Studio PPA is maintained by Paolo Rotolo. We just need to add PPA to our system and install it using the following commands:

    $ sudo add-apt-repository ppa:paolorotolo/android-studio
    $ sudo apt-get update
    $ sudo apt-get install android-studio
    

    For more, see allubuntu.com

    0 讨论(0)
  • 2020-11-30 20:49

    Run the following command on terminal.

    sudo apt-add-repository ppa:paolorotolo/android-studio
    sudo apt-get update
    sudo apt-get install android-studio
    
    0 讨论(0)
  • 2020-11-30 20:50

    The easiest method to install Android Studio (or any other developer tool) on Ubuntu is to use the snap package from Ubuntu Software store. No need to download Android Studio as zip, try to manually install it, add PPAs or fiddle with Java installation. The snap package bundles the latest Android Studio along with OpenJDK and all the necessary dependencies.

    Step 1: Install Android Studio

    Search "android studio" in Ubuntu Software, select the first entry that shows up and install it:

    Or if you prefer the command line way, run this in Terminal:

    sudo snap install --classic android-studio
    

    Step 2: Install Android SDK

    Open the newly installed Android Studio from dashboard:

    Don't need to import anything if this is the first time you're installing it:

    The Setup Wizard'll guide you through installation:

    Select Standard install to get the latest SDK and Custom in-case you wanna change the SDK version or its install location. From here on, it's pretty straightforward, just click next-next and you'll have the SDK downloaded and installed.

    Step 3: Setting PATHs (Optional)

    This step might be useful if you want Android SDK's developer tool commands like adb, fastboot, aapt, etc available in Terminal. Might be needed by 3rd party dev platforms like React Native, Ionic, Cordova, etc and other tools too. For setting PATHs, edit your ~/.profile file:

    gedit ~/.profile
    

    and then add the following lines to it:

    # Android SDK Tools PATH
    export ANDROID_HOME=${HOME}/Android/Sdk
    export PATH="${ANDROID_HOME}/tools:${PATH}"
    export PATH="${ANDROID_HOME}/emulator:${PATH}"
    export PATH="${ANDROID_HOME}/platform-tools:${PATH}"
    

    If you changed SDK location at the end of Step 2, don't forget to change the line export ANDROID_HOME=${HOME}/Android/Sdk accordingly. Do a restart (or just logout and then log back in) for the PATHs to take effect.


    Tested on Ubuntu 16.04LTS and above. Would work on 14.04LTS too if you install support for snap packages first.


    Note: This question is similar to the AskUbuntu question "How to install Android Studio on Ubuntu?" and my answer equally applies. I'm reproducing my answer here to ensure a full complete answer exists rather than just a link.

    0 讨论(0)
  • 2020-11-30 20:50

    Android Studio is now integrated in JetBrains Toolbox:

    This free tool allows to easily install all JetBrains products, and Android Studio as well. Upgrade is automatic.

    On Ubuntu, this tools requires FUSE (Filesystem in Userspace)

    0 讨论(0)
提交回复
热议问题