File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -53,21 +53,24 @@ ENV JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre" \
5353# =====================
5454# Install Android SDK
5555# =====================
56- ARG SDK_VERSION=25.2.3
57- ARG ANDROID_BUILD_TOOLS_VERSION=25 .0.3
56+ ARG SDK_VERSION=sdk-tools-linux-3859397
57+ ARG ANDROID_BUILD_TOOLS_VERSION=26 .0.0
5858ENV SDK_VERSION=$SDK_VERSION \
5959 ANDROID_BUILD_TOOLS_VERSION=$ANDROID_BUILD_TOOLS_VERSION \
6060 ANDROID_HOME=/root
6161
62- RUN wget -O tools.zip https://dl.google.com/android/repository/tools_r ${SDK_VERSION}-linux .zip && \
62+ RUN wget -O tools.zip https://dl.google.com/android/repository/${SDK_VERSION}.zip && \
6363 unzip tools.zip && rm tools.zip && \
6464 chmod a+x -R $ANDROID_HOME && \
6565 chown -R root:root $ANDROID_HOME
66+ ENV PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin
6667
67- ENV PATH=$PATH:$ANDROID_HOME/tools
68-
69- RUN echo y | android update sdk -a -u -t platform-tools,build-tools-${ANDROID_BUILD_TOOLS_VERSION}
68+ # https://askubuntu.com/questions/885658/android-sdk-repositories-cfg-could-not-be-loaded
69+ RUN mkdir -p ~/.android
70+ RUN touch ~/. android/repositories.cfg
7071
72+ RUN echo y | sdkmanager "platform-tools"
73+ RUN echo y | sdkmanager "build-tools;$ANDROID_BUILD_TOOLS_VERSION"
7174ENV PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools
7275
7376# ====================================
Original file line number Diff line number Diff line change 1313@test ' Verify Android SDK is installed' {
1414 [ $ANDROID_HOME == " /root" ]
1515
16- android_list_sdk=$( android list sdk)
17- [[ $android_list_sdk == * " Refresh Sources" * ]]
16+ android_list_sdk=$( sdkmanager --list)
17+ [[ $android_list_sdk == * " Installed packages:" * ]]
18+ [[ $android_list_sdk == * " Available Packages:" * ]]
1819}
1920
2021@test ' Verify Appium server is installed' {
You can’t perform that action at this time.
0 commit comments