gpt4 book ai didi

android - Travis-CI 构建失败, "You have not accepted the license agreements"

转载 作者:太空狗 更新时间:2023-10-29 13:54:40 27 4
gpt4 key购买 nike

我有以下 Travis-CI 配置:

language: android
jdk: oraclejdk8
android:
components:
- build-tools-22.0.1
- android-22
- extra-google-m2repository
before_install:
- openssl aes-256-cbc -K $encrypted_8bf9e2e639dc_key -iv $encrypted_8bf9e2e639dc_iv
-in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
- chmod +x gradlew

当它尝试构建时出现以下错误:

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> You have not accepted the license agreements of the following SDK components:
[ConstraintLayout for Android 1.0.0-alpha7, Solver for ConstraintLayout 1.0.0-alpha7].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 17.927 secs
The command "./gradlew build connectedCheck" exited with 1.
Done. Your build exited with 1.

现在,根据 travis 文档的说法,travis 默认接受所有许可证,所以这不应该发生。

有什么办法可以解决吗?

最佳答案

接受所有许可的另一个选项如下:

before_install:
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"

您可以在这里找到更多相关信息:

关于android - Travis-CI 构建失败, "You have not accepted the license agreements",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41092774/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com