Travis-CI`Android 28许可证未被接受` [英] Travis-CI `Android 28 licenses have not been accepted`
本文介绍了Travis-CI`Android 28许可证未被接受`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 android-28
和 build-tools-28.0.0
但无论我怎么做
I'm trying to build android project using Travis using android-28
and build-tools-28.0.0
but no matter what I do I get
>Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-28 Android SDK Platform 28
build-tools;28.0.0 Android SDK Build-Tools 28
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
在编译过程中。
我尝试过:
- 添加:
- adding:
components:
- build-tools-28.0.0
- android-28
echo y | android update sdk --no-ui --filter build-tools-28.0.0,android-28,extra-android-m2repository
yes | sudo $ANDROID_HOME/tools/bin/sdkmanager --licenses
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
$ ANDROID_SDK / licenses
。
$ANDROID_SDK/licenses
.我很漂亮确保2周前它完全正常工作,但现在每次都抛出此错误。
I'm pretty sure that 2 weeks ago it was working completely normal, but now it just throwing this error everytime.
有问题的PR ,因此您可以查看错误,构建和文件。
PR in question so you can look at errors, builds and files.
推荐答案
在您的 .travis.yml
文件中添加以下代码
Add code below to your .travis.yml
file
before_install:
- yes | sdkmanager "platforms;android-28"
or
before_install:
- chmod +x gradlew
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
- yes | sdkmanager --update
- yes | sdkmanager --licenses
这篇关于Travis-CI`Android 28许可证未被接受`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文