jitpack.io icon indicating copy to clipboard operation
jitpack.io copied to clipboard

Failed to install the following Android SDK packages as some licences have not been accepted.

Open ashLikun opened this issue 7 years ago • 74 comments

A problem occurred evaluating script.

Failed to install the following Android SDK packages as some licences have not been accepted. platforms;android-27 Android SDK Platform 27 build-tools;27.0.3 Android SDK Build-Tools 27.0.3 To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

Using Android SDK: /opt/android-sdk-linux

ashLikun avatar Jan 19 '19 02:01 ashLikun

I have the same problem when trying to publish my own android library to jitpack. It was working fine just yesterday. But now it suddenly give me an error message:

 Failed to install the following Android SDK packages as some licences have not been accepted.
     build-tools;28.0.3 Android SDK Build-Tools 28.0.3
     platforms;android-28 Android SDK Platform 28

I rebuilt my library and updated the version several times but still no use. Is it something wrong with the jitpack server?

hal0360 avatar Jan 19 '19 03:01 hal0360

Seeing as there are three other issues right before this one about the same problem, I'd say it's probably something up with the build servers.

https://github.com/jitpack/jitpack.io/issues/3686 https://github.com/jitpack/jitpack.io/issues/3685 https://github.com/jitpack/jitpack.io/issues/3684

zacharee avatar Jan 19 '19 04:01 zacharee

I had the same problem.

look0089 avatar Jan 19 '19 06:01 look0089

I have same issue!:|

`* What went wrong: A problem occurred configuring project ':app'.

Failed to install the following Android SDK packages as some licences have not been accepted. build-tools;28.0.3 Android SDK Build-Tools 28.0.3 platforms;android-28 Android SDK Platform 28 `

HamidrezaAmz avatar Jan 19 '19 09:01 HamidrezaAmz

I had the same problem too!

RX1226 avatar Jan 19 '19 17:01 RX1226

anyone resolve the problem?

sicmu avatar Jan 20 '19 07:01 sicmu

The same with me

Hackforid avatar Jan 20 '19 10:01 Hackforid

Anyone resolve this issue?

avshvetsov avatar Jan 20 '19 16:01 avshvetsov

@avshvetsov I have managed to resolve this by "hacking" around the script by adding command to accept the license. Please refer to this commit that have resolved my build. This is the log that proves that it has built successfully.

Basically, you add one line of code at your project file graldew with the following code

yes | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;28.0.3"

TonyTangAndroid avatar Jan 20 '19 17:01 TonyTangAndroid

@avshvetsov

Thanks!!!

yes | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-28"

yes | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;27.0.3"

worked for me on gradlew

giladna avatar Jan 20 '19 18:01 giladna

I have a safer solution. First of all, put this in jitpack.yml and not in gradlew -- so it will only affect JitPack and not others that happen to run your build. Second, instead of explicitly installing the components, just tell Android you accepted the license.

Step one

Copy this gist to some server you control (GitHub pages is a great option and so is a Gist): https://gist.github.com/noamtamim/b04ef67239d2b43638aa5a9a024a1937

Step two

Create jitpack.yml (if you don't have one already) in the root of the repo:

before_install:
  - curl URL_OF_THE_FILE | sh

Example:

before_install:
  - curl https://gist.githubusercontent.com/noamtamim/b04ef67239d2b43638aa5a9a024a1937/raw/56f1a38dd88a3774b71a063822444f3961d61873/android-sdk-license.sh | sh

Make sure the URL is to the RAW file. But please copy this to your own account/gist/server. Every time there's an updated license, update this file with the new license hash. Legally if you run this script (or your own version of it), it means you accepted the license. See here for more info: https://developer.android.com/studio/intro/update#download-with-gradle

noamtamim avatar Jan 20 '19 20:01 noamtamim

Hi all,

Should be fixed now. Thanks for the workarounds!

jitpack-io avatar Jan 21 '19 12:01 jitpack-io

Hi, seems not fixed yet

Build starting... Start: Mon Jan 21 13:36:13 UTC 2019 7ad8e0ad4e6c

...

Failed to install the following Android SDK packages as some licences have not been accepted. build-tools;28.0.3 Android SDK Build-Tools 28.0.3 platforms;android-28 Android SDK Platform 28

Anyway thanks for addressing this issue!

masako-yamada avatar Jan 21 '19 13:01 masako-yamada

seems to be fixed already, thanks :)

tibbi avatar Jan 21 '19 15:01 tibbi

@jitpack-io not all problems are resolved: https://jitpack.io/com/github/avshvetsov/FastScroll/6ca6585d5a/build.log

Can you help?

avshvetsov avatar Jan 21 '19 18:01 avshvetsov

It is not working for me either https://jitpack.io/com/github/goui/testlib/0.1.4/build.log

I have added the 2 lines at the end of my gradlew. Thing is, even without those lines the ./gradlew install was working for me locally.

I think you might have a problem with your CI not accepting the licenses.

goui avatar Jan 21 '19 21:01 goui

@jitpack-io https://jitpack.io/com/github/silencedut/diffadapter/1.2.0/build.log still not be resolved in my project

SilenceDut avatar Jan 22 '19 02:01 SilenceDut

@SilenceDut Rebuilt v1.2.0

jitpack-io avatar Jan 23 '19 10:01 jitpack-io

Still not working for me :/ https://jitpack.io/com/github/inmobly/boltplay/1.0.18/build.log

oahmedazab avatar Jan 29 '19 14:01 oahmedazab

Still not working for me :/ https://jitpack.io/com/github/inmobly/boltplay/1.0.18/build.log

@oahmedazab did you try my workaround? It's very easy to implement. See https://github.com/jitpack/jitpack.io/issues/3687#issuecomment-455901608.

noamtamim avatar Jan 29 '19 22:01 noamtamim