Open Lyoness opened 7 years ago
Since the release of Trusty as default distribution there are a lot of people starting to work with the new Cookiecat image, and avdmanager is required for all the previous android avd
commands after the android
tool was
@iriberri Is there a workaround available to install this at build time? I definitely want to get this addressed in the image itself, but wanted to get clarification on how much of a blocker this is.
A run-time workaround is available, sort of, but will have some major involvement from the users.
I tried some stuff (https://github.com/uber/AutoDispose/pull/79#issuecomment-327919024) without much tweaking:
I am not quite sure what is happening here. In https://travis-ci.org/uber/AutoDispose/builds/272986414#L1139-L1144, you can see that
build-tools 26.0.1
is installed (byandroid update sdk
, which may or may not make a difference). According to https://developer.android.com/studio/command-line/avdmanager.html, one should expect this inandroid_sdk/tools/bin/
, but it is not clear to me where this is. Our default installation exists in/usr/local/android-sdk
(which is a symlink to/usr/local/android-sdk-25.2.3
), but after the installationavdmanager
does not exist in/usr/local/android-sdk/tools/bin
.
My understanding is that avdmanager
is included for SDK tools 25.3.0 and later, but installing a version satisfying this condition does not seem to make it available. (I ran a debug build to poke around.)
sdkmanager
Using sdkmanager
(instead of android
) appears to work, though. https://github.com/travis-ci/travis-build/tree/ha-android-sdkmanager
It installs packages into /opt/android
, which is then added to $PATH
. You can see avdmanager
is available. (It is not clear to me how this translates to actual builds, since I have zero experience with Android development.)
It is conceivable that these steps are adaptable without changing travis-build
.
/usr/local/android-sdk(*)
, but maybe this is not usable. /opt
is writable; in the above example I used /opt/android
.)sdkmanager
currently available on $PATH
to install packages with --sdk_root=/opt/android
./opt/android/tools/bin
to $PATH
.We should eventually move to sdkmanager
(https://github.com/travis-ci/travis-ci/issues/8155#issuecomment-318255019) but I feel this would need more testing.
https://github.com/travis-pro/team-sapphire/issues/667#issuecomment-321265220