我有这个错误,但接受sdk许可协议
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;29.0.2 Android SDK Build-Tools 29.0.2
platforms;android-29 Android SDK Platform 29
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: /usr/lib/android-sdk我有两个android-sdk
一个位于/usr/lib/android-sdk,另一个位于home/bug/Android/Sdk
yes | $ANDROID_SDK_ROOT/tools/bin/sdkmanager "build-tools;29.0.2"
Warning: File /home/bug/.android/repositories.cfg could not be loaded.
[=======================================] 100% Computing updates...使用这个命令,我在home/bug/Android中接受
但是如何接受/usr/lib/android-sdk中的许可证呢?
发布于 2021-03-19 03:53:16
您可以使用
yes | /usr/lib/android-sdk/tools/bin/sdkmanager --licenses我不确定,但您可能还需要创建repositories.cfg文件:
mkdir ~/.android
echo "count=0" > ~/.android/repositories.cfghttps://stackoverflow.com/questions/66698099
复制相似问题