SDK Manager某些许可证尚未被接受

时间:2019-11-24 09:22:08

标签: android android-sdk-manager

尝试运行 ./gradlew build

时出现以下错误
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> 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

但是当我运行 ./sdkmanager --licenses 时,我得到了:

Warning: File /var/jenkins_home/.android/repositories.cfg could not be loaded.
All SDK package licenses accepted.======] 100% Computing updates...

1 个答案:

答案 0 :(得分:0)

我犯了一个如此愚蠢的错误,我使用的是xmartlabs/jenkins-android图像,根据其--no-binary :all:pip install <module> --no-binary :all: 设置为Dockerfile。错误中也提到了这一点,但我没有注意到。无论如何,我最终还是在一个单独的目录中创建了一个android sdk,在该目录中接受了许可证,因此不断出现未接受的许可证协议错误。