CircleCI Android约束布局不起作用

朱蒂孔

我现在正在为我的项目使用CircleCI也在我的项目中实现新的constraintLayout现在,我被CircleCI大楼困住了。它在gradle -dependencies运行时向我显示了这一点

File /home/ubuntu/.android/repositories.cfg could not be loaded.
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:
  [com.android.support.constraint:constraint-layout:1.0.0-alpha3, com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3].
  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

这是我在.yml文件中的配置:

#Install android build tools, platforms
#Supported versions here https://circleci.com/docs/android
machine:
    java:
        version: openjdk8
    environment:
        ANDROID_HOME: /usr/local/android-sdk-linux

dependencies:
    pre:
        - echo y | android list sdk
        - echo y | android update sdk --no-ui --all --filter "tools"
        - echo y | android update sdk --no-ui --all --filter "platform-tools"
        - echo y | android update sdk --no-ui --all --filter "build-tools-24.0.0"
        - echo y | android update sdk --no-ui --all --filter "android-24"
        - echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"
        - echo y | android update sdk --no-ui --all --filter "extra-google-google_play_services"
        - echo y | android update sdk --no-ui --all --filter "extra-android-support"
        - echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
        - (./gradlew -version):
                    timeout: 360
    override:
        #- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies
        - export TERM="dumb"; if [ -e ./gradlew ]; then ./gradlew clean dependencies -stacktrace;else gradle clean dependencies -stacktrace;fi

#Pull any submodules
checkout:
  post:
    - git submodule init
    - git submodule update

#-PdisablePreDex is a must else gradle just dies due to memory limit
#Replace
test:
    override:
        - (./gradlew assemble -PdisablePreDex):
            timeout: 360
        - cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME}/app/build/outputs/apk/ $CIRCLE_ARTIFACTS
        - emulator -avd circleci-android22 -no-audio -no-window:
            background: true
            parallel: true
        # wait for it to have booted
        - circle-android wait-for-boot
        # run tests  against the emulator.
        - ./gradlew connectedAndroidTest

#Deploy when tests pass
deployment:
    #production:
    #    branch: master
    #    commands:
    #        - (./gradlew clean assembleRelease crashlyticsUploadDistributionRelease -PdisablePreFex):
    #            timeout: 720

    staging:
        branch: staging
        commands:
             - (./gradlew clean assembleStaging crashlyticsUploadDistributionStaging -PdisablePreFex):
                timeout: 720

我在何时检查构建日志

echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"

命令运行,结果如下:

November 20, 2015
Do you accept the license 'android-sdk-license-c81a61d9' [y/n]: 
Installing Archives:
  Preparing to install archives
  Downloading Android Support Repository, revision 33
  Installing Android Support Repository, revision 33
    Installed Android Support Repository, revision 33
  Done. 1 package installed.

我的课路径是:

classpath 'com.android.tools.build:gradle:2.2.0-alpha4'

我不确定自己做错了什么,还是需要添加更多内容。请提出建议。谢谢。

傅立新

TL; DR

您需要将许可证从中复制$ANDROID_HOME/licenses到CircleCI环境中。

您可以压缩许可证并将其存储在Dropbox(或类似的circle.yml文件)上,并修改文件以下载许可证并将其解压缩到$ANDROID_HOME

错误的最后一段几乎可以解释它

在构建项目之前,您需要接受许可协议并使用Android Studio SDK Manager完成缺少组件的安装。或者,要了解如何将许可协议从一个工作站转移到另一个工作站,请访问http://d.android.com/r/studio-ui/export-licenses.html

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

jest.config.js中的`moduleNameMapper`设置在CircleCI上不起作用

来自分类Dev

相对布局在 Android Studio 中不起作用始终在设计视图中显示约束布局

来自分类Dev

CircleCI在Android支持库上构建FAILURE

来自分类Dev

CircleCI在Android支持库上构建FAILURE

来自分类Dev

CircleCI CLI 查找 Android SDK 的错误路径

来自分类Dev

约束布局不起作用;跨设备的布局被破坏

来自分类Dev

为什么自动布局约束不起作用?

来自分类Dev

Swift自动布局:子视图中的约束不起作用

来自分类Dev

约束布局中的滚动条不起作用

来自分类Dev

Android ListView项目布局不起作用

来自分类Dev

全屏布局在Android上不起作用

来自分类Dev

CircleCI对非零退出代码有什么作用?

来自分类Dev

布局不起作用

来自分类Dev

CircleCI Android不支持的major.minor版本52.0

来自分类Dev

放弃约束不起作用

来自分类Dev

检查约束不起作用

来自分类Dev

检查约束不起作用

来自分类Dev

约束更改不起作用

来自分类Dev

ImageView的约束不起作用

来自分类Dev

边框布局不起作用

来自分类Dev

我的布局不起作用

来自分类Dev

边框布局不起作用

来自分类Dev

布局边距在Android 2.3.3上不起作用

来自分类Dev

Android recyclerView项目布局参数不起作用

来自分类Dev

布局动画在Android上不起作用(create()方法)

来自分类Dev

Android多屏布局支持不起作用

来自分类Dev

为什么以编程方式使用“自动布局”约束进行居中不起作用?

来自分类Dev

自动布局约束不起作用iPhone 6和6 Plus

来自分类Dev

以编程方式创建布局,使用堆栈视图和约束不起作用