Downloading the Android support library from command line

[亡魂溺海] 提交于 2019-11-30 02:28:10

问题


How do you download the Android support library via the command line?

For example:

echo y | android update sdk --no-ui --filter "android-19"

回答1:


echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"



回答2:


android command is deprecated now

You can use sdkmanager instead like so:

sdkmanager --install "extras;android;m2repository"



回答3:


sdkmanager "extras;android;m2repository"

worked for me.
I ran in to the error: Warning: File /var/root/.android/repositories.cfg could not be loaded.

so I had to create that file before running the above command.

touch ~/.android/repositories.cfg


来源:https://stackoverflow.com/questions/23436564/downloading-the-android-support-library-from-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!