I want to setup the Android dev environment from command line, and encounter the following issue:
wget http://dl.google.com/android/android-sdk_r22.0.5-linux.tgz
after extract the file, run
tools/android update sdk --no-ui
However, it is too slow on running
Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
The result is that nothing in folder build-tools, and I want is aapt and apkbuilder, since I want to build apk from command line without ant.
Install the SDKClick Tools > SDK Manager. In the SDK Platforms tab, select Android 12. In the SDK Tools tab, select Android SDK Build-Tools 31. Click OK to install the SDK.
The sdkmanager is a command line tool that allows you to view, install, update, and uninstall packages for the Android SDK. If you're using Android Studio, then you do not need to use this tool and you can instead manage your SDK packages from the IDE.
To open the SDK Manager from Android Studio, click Tools > SDK Manager or click SDK Manager in the toolbar. If you're not using Android Studio, you can download tools using the sdkmanager command-line tool. When an update is available for a package you already have, a dash appears in the check box next to the package.
By default, the SDK Manager from the command line does not include the build tools in the list. They're in the "obsolete" category. To see all available downloads, use
android list sdk --all
And then to get one of the packages in that list from the command line, use:
android update sdk -u -a -t <package no.>
Where -u stands for --no-ui, -a stands for --all and -t stands for --filter.
If you need to install multiple packages do:
android update sdk -u -a -t 1,2,3,4,..,n
Where 1,2,..,n is the package number listed with the list command above
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With