Android Docker 建议升级SDK Tools底包以支持ConstraintLayout
alwaystest opened this issue · 3 comments
alwaystest commented
ConstraintLayout 好像只能通过SdkManager来下载,GoogleCode
参考了wizbii的DockerFile
使用 tools_r25.2.3-linux
中的SdkManager来安装ConstraingLayout的依赖。
这样就可以编译使用CoordinatorLayout的APK了。
我修改后的DockerFile
FROM snowdream/gradle:3.4
MAINTAINER snowdream <yanghui1986527@gmail.com>
# Install dependencies
RUN dpkg --add-architecture i386 && \
apt-get -qq update && \
apt-get -qqy install libc6:i386 libstdc++6:i386 zlib1g:i386 libncurses5:i386 tar git --no-install-recommends && \
rm -rf /var/lib/apt/lists/*
# Download and untar Android SDK
ENV ANDROID_SDK_URL https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
ENV ANDROID_HOME ${SDK_HOME}/android-sdk-linux
ENV ANDROID_SDK ${SDK_HOME}/android-sdk-linux
RUN curl -L "${ANDROID_SDK_URL}" > android-sdk.zip
RUN unzip android-sdk.zip -d ${ANDROID_HOME} && rm android-sdk.zip
ENV PATH ${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:$ANDROID_HOME/platform-tools:$PATH
# Install Android SDK components
ENV ANDROID_COMPONENTS platform-tools,build-tools-25.0.2,android-25
ENV GOOGLE_COMPONENTS extra-android-m2repository,extra-google-m2repository
RUN echo y | android update sdk --no-ui --all --filter "${ANDROID_COMPONENTS}" ; \
echo y | android update sdk --no-ui --all --filter "${GOOGLE_COMPONENTS}"
RUN echo y | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2"
RUN echo y | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2"
snowdream commented
- http://tools.android.com/build/gradleplugin
- https://docs.travis-ci.com/user/languages/android
- http://gmariotti.blogspot.com/2014/05/integrating-android-github-repo-with.html
- https://juejin.im/entry/589d1c251b69e60059ba04b5/?utm_source=gold-miner&utm_medium=readme&utm_campaign=github
- https://hub.docker.com/r/wizbii/android-sdk/~/dockerfile/
- http://stackoverflow.com/questions/42731625/travis-ci-failed-because-cannot-accept-license-constrain-layout
- https://hub.docker.com/r/wizbii/android-sdk/~/dockerfile/
- http://quanqi.org/2016/05/20/code-labs-constraint-layout/
- https://github.com/bitrise-docker/android/blob/master/Dockerfile
- https://github.com/mreichelt/docker-android/blob/master/Dockerfile
- https://github.com/chibatching/docker-android-sdk/blob/b1d1c4274e041de01b2be099c00949e057694ee6/Dockerfile
- https://github.com/PSDev/docker-android-env/blob/c1dfb4656a89172f388a2ff3236046e261fe7e8a/Dockerfile
- https://www.hiroom2.com/2017/02/24/docker-using-expect-script-directly-in-dockerfile-will-be-complicated/#sec-1
snowdream commented
非常感谢,已经升级修复,请使用最新的镜像试试。
镜像: snowdream/android
标签: latest
25
请帮忙验证下, 谢谢。
alwaystest commented
使用GoogleExample验证编译通过,感谢。