Kiwix-android: Travis-CI fails as we don't accept the terms of Google's licenses

Created on 16 Oct 2017  路  10Comments  路  Source: kiwix/kiwix-android

I noticed a build on Travis failed for a minor change (fixing a typo in text).
https://travis-ci.org/kiwix/kiwix-android

See below for the relevant text

File /home/travis/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 25 in /usr/local/android-sdk/licenses
Warning: License for package Android SDK Build-Tools 25 not accepted.
Checking the license for package Android SDK Platform 24 in /usr/local/android-sdk/licenses
Warning: License for package Android SDK Platform 24 not accepted.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':kiwixlib'.
> You have not accepted the license agreements of the following SDK components:
  [Android SDK Build-Tools 25, Android SDK Platform 24].
  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

I've not got time to investigate this today, I'll do so in the next few days however anyone else is welcome to address it sooner :)

bug

All 10 comments

@mhutti1 Seems we need to fix that if we want to get a new build of 2.3 (currently nothing seems to be build at all).

I think this is due to them moving more of the SDK to be available via gradle download. It should be as simple as reaccepting the licence and updating the file that we host on the kiwix.org domain. I will look at tonight.

@mhutti1 thank you.

BTW: are the good reasons why we don't use one of the many tricks to pipe y to sdkmanager? e.g. see https://stackoverflow.com/a/45782695/340175 and https://stackoverflow.com/a/43672509/340175 for example

https://stackoverflow.com/questions/38096225/automatically-accept-all-sdk-licences

I don't think I have access to write files to our download server otherwise I'd try your approach of saving the licence key there and downloading it in the travis script.

Its considerably quicker to do it this way when I tested it.

@kelson42 can you replace the contents of http://download.kiwix.org/dev/android/api/licenses/android-sdk-licenses with:

8933bad161af4178b1185d1a37fbf41ea5269c55
d56f5187479451eabf01fb78af6dfcb131a6481e

@julianharty it is also recomended by google in their documentation.

@mhutti1 where? :) and thank you.

@mhutti1 done

I restarted the build on Travis and it now passes :) Well done and thanks all.

Was this page helpful?
0 / 5 - 0 ratings