CircleCI Android constraintLayout doesn't work

前端 未结 4 1834
攒了一身酷
攒了一身酷 2021-02-15 00:25

I am now using the CircleCI for my project. Also I am implementing the new constraintLayout in my project. Now I am stuck with the CircleCI bui

相关标签:
4条回答
  • 2021-02-15 00:58

    I have same issue with ConstraintLayout, this is my working config circle.yml

    0 讨论(0)
  • 2021-02-15 00:58

    TL;DR

    You need to copy the licenses from $ANDROID_HOME/licenses into your CircleCI environment.

    You can zip up your licenses and store it on Dropbox (or something similar) and modify your circle.yml file to download the licenses and extract it to $ANDROID_HOME.

    The last paragraph of the error pretty much explains it

    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

    0 讨论(0)
  • 2021-02-15 00:59

    This worked for me, and also checks for cached versions first:

    dependencies:
      pre:
        # Android SDK Platform 24
        - if [ ! -d "/usr/local/android-sdk-linux/platforms/android-24" ]; then echo y | android update sdk --no-ui --all --filter "android-24"; fi
        # Android SDK Build-tools, revision 24.0.1
        - if [ ! -d "/usr/local/android-sdk-linux/build-tools/24.0.1" ]; then echo y | android update sdk --no-ui --all --filter "build-tools-24.0.1"; fi
        # Android Support Repository, revision 35 / Local Maven repository for Support Libraries
        - if [ ! -d "/usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/design/24.1.0" ]; then echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"; fi
    
    
      cache_directories:
        - /usr/local/android-sdk-linux/platforms/android-24
        - /usr/local/android-sdk-linux/build-tools/24.0.1
        - /usr/local/android-sdk-linux/extras/android/m2repository
    

    Taken from this post by CircleCI employee drazisil

    0 讨论(0)
  • 2021-02-15 01:09

    Alex Fu's answer explains nicely where the problem lies and how to deal with it but there is a simpler solution. Since the license files are really just simple files with a bunch of hex characters in them you can create them simply without any copying. An example would be putting the following code into the pre: section:

    - ANDROID_HOME=/usr/local/android-sdk-linux
    - mkdir "$ANDROID_HOME/licenses" || true
    - echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
    - echo "84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
    - echo "d975f751698a77b662f1254ddbeed3901e976f5a" > "$ANDROID_HOME/licenses/intel-android-extra-license"
    
    0 讨论(0)
提交回复
热议问题