amrsa1 / Android-Emulator-image

The use of this Docker image simplifies the process of running an Android emulator within a Docker container
MIT License
83 stars 43 forks source link

emulator package must be installed #23

Closed bonrg closed 1 month ago

bonrg commented 2 months ago

docker compose up -d

=> ERROR [ 6/10] RUN echo "no" avdmanager --verbose create avd --force --name "nexus" --device "Nexus 6" --package "system-images;android-34;google_apis_playstore;x86_64" 1.6s
> [ 6/10] RUN echo "no" avdmanager --verbose create avd --force --name "nexus" --device "Nexus 6" --package "system-images;android-34;google_apis_playstore;x86_64":

[=======================================] 100% Fetch remote repository...

0 1.189 Auto-selecting single ABI x86_64

0 1.566 Error: "emulator" package must be installed!

0 1.566 null


failed to solve: process "/bin/bash -c echo \"no\" | avdmanager --verbose create avd --force --name \"${EMULATOR_NAME}\" --device \"${EMULATOR_DEVICE}\" --package \"${EMULATOR_PACKAGE}\"" did not complete successfully: exit code: 1

geo-tech commented 1 month ago

You have to add this two Lines in your Dockerfile.

============================================

Install required package using SDK manager

============================================

RUN yes Y | sdkmanager --licenses RUN yes Y | sdkmanager --verbose --no_https ${ANDROID_SDK_PACKAGES} RUN yes Y | sdkmanager --channel=3 emulator

============================================

Create required emulator

============================================

ARG EMULATOR_NAME="nexus" ARG EMULATOR_DEVICE="Nexus 6" ENV EMULATOR_NAME=$EMULATOR_NAME ENV DEVICE_NAME=$EMULATOR_DEVICE ENV EMULATOR_PACKAGE=$EMULATOR_PACKAGE RUN echo "no" | avdmanager --verbose create avd --force --name "${EMULATOR_NAME}" --device "${EMULATOR_DEVICE}" --package "${EMULATOR_PACKAGE}"

amrsa1 commented 1 month ago

@bonrg Should be working now, could you try again ?

amrsa1 commented 1 month ago

Kindly open another ticket if the issue still persists