File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,12 @@ RUN apt-get update && \
2121 apt-get clean && \
2222 rm -rf /var/lib/apt/lists/*
2323
24- # Download emulator directly as fallback (sdkmanager doesn't always provide it)
25- RUN mkdir -p /opt/android-sdk && \
26- cd /opt/android-sdk && \
27- wget -q "https://dl.google.com/android/repository/emulator-linux_x64-11076708_latest.zip" -O emulator.zip || true && \
28- if [ -f emulator.zip ]; then \
29- unzip -q emulator.zip && rm emulator.zip; \
30- else \
31- echo "Warning: Failed to download emulator, will install via sdkmanager" ; \
24+ RUN curl -s "https://dl.google.com/android/repository/repository2-1.xml" | \
25+ grep -oP 'emulator-linux_x64-\d +\. zip' | head -1 | \
26+ awk '{print "https://dl.google.com/android/repository/" $0}' | \
27+ wget -q -O /tmp/emulator.zip - || true && \
28+ if [ -s /tmp/emulator.zip ] && [ -f /tmp/emulator.zip ]; then \
29+ unzip -q /tmp/emulator.zip -d /opt/android-sdk && rm /tmp/emulator.zip; \
3230 fi
3331
3432# Set up Android SDK
You can’t perform that action at this time.
0 commit comments