Linux系统Android SDK 下载版本,报错Warning: File /root/.android/repositories.cfg coul

Linux CentOS7系统Android SDK 运行android update sdk --no-ui,报错Warning: File /root/.android/repositories.cfg coul
报错内容:

[root@compile-server bin]# android update sdk --no-ui
*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
"android" SDK commands can be translated to sdkmanager commands on a best-effort basis.
Continue? (This prompt can be suppressed with the --use-sdk-wrapper command-line argument
or by setting the USE_SDK_WRAPPER environment variable) [y/N]: y
Running /home/test/android-sdk-linux/tools/bin/sdkmanager --update

Warning: File /root/.android/repositories.cfg could not be loaded.
done

报错原因是:在/root/.android/目录下缺少repositories.cfg 文件

  • 1.创建repositories.cfg 文件
touch /root/.android/repositories.cfg
  • 2.再次运行
[root@compile-server bin]# android update sdk --no-ui
*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
"android" SDK commands can be translated to sdkmanager commands on a best-effort basis.
Continue? (This prompt can be suppressed with the --use-sdk-wrapper command-line argument
or by setting the USE_SDK_WRAPPER environment variable) [y/N]: y
Running /home/test/android-sdk-linux/tools/bin/sdkmanager --update

done

你可能感兴趣的:(sdk,linux)