xaethos / android-sdk-resource

Concourse resource that provides Android SDK dependencies
MIT License
10 stars 3 forks source link

License not accepted when trying to run a build #1

Open hIUG opened 4 years ago

hIUG commented 4 years ago

When including this resource as part of a Concourse pipeline and trying to run :app:assembleDebug the response is

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
  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: /tmp/build/63c5f882/android-sdk-linux

And, manually running the sdkmanager to accept the licenses is not possible since the /toos/bin folder doesn't contain the sdkmanager:

  • ls -l /tmp/build/63c5f882/android-sdk-linux/tools/bin total 7712 -rwxr--r-- 1 root root 2114036 Oct 14 2015 e2fsck -rwxr--r-- 1 root root 2114036 Oct 14 2015 fsck.ext4 -rwxr--r-- 1 root root 1482940 Oct 14 2015 mkfs.ext4 -rwxr--r-- 1 root root 837320 Oct 14 2015 resize2fs -rwxr--r-- 1 root root 1331428 Oct 14 2015 tune2fs

The license should already be accepted while downloading the sources or the sdkmanager should exist to attempt accepting it before (via yes | sdkmanager "build-tools;28.0.3") but neither of these options is available.

harishgupta01 commented 3 years ago

@hIUG @xaethos Did you get any solution for this issue?

xaethos commented 3 years ago

Unfortunately, I haven't been working on this repository (or with Concourse) for about 5 years now. The SDK tools change every now and then, so it's likely things are not up to date. Please feel free to fork this for development.