Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] How do I set up Android SDK on Windows docker?

Posted on November 11, 2022 By

Solution 1 :

Use something like this in your Dockerfile

escape=`  
    
# Use the latest Windows Server Core 2019 image.
    
FROM mcr.microsoft.com/windows/servercore:ltsc2019 AS base
    
    # Restore the default Windows shell for correct batch processing.
 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
    
    #Install 7Zip
 RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
        Invoke-WebRequest -UseBasicParsing https://www.7-zip.org/a/7z1805-x64.msi -OutFile 7z.msi; `
        Start-Process msiexec -ArgumentList '/i 7z.msi', '/quiet', '/norestart' -NoNewWindow -Wait; `
        Remove-Item -Force 7z.msi;
    
    SHELL ["cmd", "/S", "/C"]
    
    # Install Android SDK 28 using cmdline tools for Android 
RUN curl -SL --output cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-win-8512546_latest.zip && "C:Program Files7-Zip7z.exe" e cmdline-tools.zip -o"C:Program Files (x86)Androidandroid-sdk" && cd "C:Program Files (x86)Androidandroid-sdktoolsbin" && echo y|sdkmanager "platform-tools" "platforms;android-28"

— bcch

Problem :

Trying to set up a Windows server 2019 docker image with Android SDK installed.

Most examples online are for linux. Microsoft only supports latest version https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools

How do I install a specific version?

READ  [FIXED] java - How to change two button images when clicking one in Android?
Powered by Inline Related Posts
Android Tags:android, docker, dockerfile, sdk, windows

Post navigation

Previous Post: [FIXED] android.media.ImageWriter produces green screen screen on every second posted Image frame
Next Post: [FIXED] android – Notifee native module not found

Related Posts

[FIXED] Java: Interaction/connection of Android UI (Android Studio) and java backend (model) (in comparison to JavaFX) Android
[FIXED] java – frida calls the wrong constructor Android
[FIXED] google play – Error when releasing android app with app actions Android
[FIXED] android – How to initilaize viewModel using navGraph scope Android
[FIXED] android – Floating Action Button anchored to the bottom of the layout Android
[FIXED] java – error for retrieving an images from firebase Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • Can VPN be traced by police?
  • Where were Kaiser-Frazer cars built?
  • How do you make gold rose gold paint?
  • What are the newest type of dentures?
  • Can you wear joggers as dress pants?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme