Downloading the Android support library from command line

为君一笑 提交于 2019-11-30 18:17:37
echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"

android command is deprecated now

You can use sdkmanager instead like so:

sdkmanager --install "extras;android;m2repository"
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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!