我正在尝试使用 Travis 构建 android 项目android-28
and build-tools-28.0.0
但无论我做什么我都会得到
>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
编译期间。
我试过了:
- 添加:
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
.
我很确定两周前它工作完全正常,但现在它每次都会抛出这个错误。
公关有问题 https://github.com/Nozbe/WatermelonDB/pull/25这样您就可以查看错误、构建和文件。
将下面的代码添加到您的.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
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)