How to install Android SDK on Ubuntu?

前端 未结 7 1140
予麋鹿
予麋鹿 2020-12-22 18:24

For my Ubuntu machine, I downloaded the latest version of Android SDK from this page.

After extracting the downloaded .tgz file, I was trying to search for installati

7条回答
  •  感情败类
    2020-12-22 19:16

    Android SDK Manager

    sudo snap install androidsdk
    

    Usage

    You can use the sdkmanager to perform the following tasks.

    List installed and available packages

    androidsdk --list [options]
    

    Install packages

    androidsdk packages [options]
    

    The packages argument is an SDK-style path as shown with the --list command, wrapped in quotes (for example, "build-tools;29.0.0" or "platforms;android-28"). You can pass multiple package paths, separated with a space, but they must each be wrapped in their own set of quotes.

    For example, here's how to install the latest platform tools (which includes adb and fastboot) and the SDK tools for API level 28:

    androidsdk "platform-tools" "platforms;android-28"
    

    Alternatively, you can pass a text file that specifies all packages:

    androidsdk --package_file=package_file [options]
    

    The package_file argument is the location of a text file in which each line is an SDK-style path of a package to install (without quotes).

    To uninstall, simply add the --uninstall flag:

    androidsdk --uninstall packages [options]
    androidsdk --uninstall --package_file=package_file [options]
    

    Update all installed packages

    androidsdk --update [options]
    

    Note

    androidsdk it is snap wraper of sdkmanager all options of sdkmanager work with androidsdk

    Location of installed android sdk files : /home/user/AndroidSDK

    See all sdkmanager options in google documentation

提交回复
热议问题