Travis Ci build error caused by Android SDK license agreements

I have experience with CircleCi :

https://circleci.com/gh/mmirhoseini/fyber_mobile_offers/28

but I cannot solve this problem with the same repository on TravisCi :

https://travis-ci.org/mmirhoseini/fyber_mobile_offers/builds/167852390

This is the Travis error log:

FAILURE: build failed with exception.

What went wrong: There was a problem setting up the project ': fyber-app'.

You have not accepted the license agreements for the following SDK components: [SDK Patch Applier v1, Google Repository].

Before creating a 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 license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

Travis Ci Screenshot

I know that this is a problem with the license, but I don’t know how to solve it. Here is my .travis.yml file:

language: android sudo: required android: components: - tools - platform-tools - build-tools-24.0.2 - android-24 - extra-android-m2repository licenses: - 'android-sdk-preview-license-.+' - 'android-sdk-license-.+' - 'intel-android-extra-license.+' jdk: - oraclejdk8 before_install: - chmod +x gradlew script: - ./gradlew build 
+5
source share
1 answer

It seems that you do not have a Google repository.

Add - extra-google-m2repository and try building again.

Here is my .travis.yml for reference:

 language: android android: components: - tools - platform-tools - build-tools-24.0.3 - android-24 - extra-android-m2repository - extra-google-m2repository - extra-android-support - extra-google-google_play_services jdk: - oraclejdk8 script: - ./gradlew test 
+10
source

Source: https://habr.com/ru/post/1258252/


All Articles