Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Fix issue with Android Emulator not started #12

Conversation

giorgosneokleous93
Copy link

@giorgosneokleous93 giorgosneokleous93 commented Feb 17, 2020

  • It seems that the flag '-t' is not being used anymore, not sure since when as I couldn't find any documentation

  • To ensure that the API is installed we run the sdkmanager --install

  • API Level used now is "android-29" - changed as running "android-21" as previously the emulator warns that the 21 emulator is significantly slower

  • Use the -k flag as recommended from the avdmanager doc

  • To find list of AVD's you can run 'sdkmanager --list'

The installation of the SDK should happen only once.

Closes Issue:
#11

(disclaimer: this is my first github action modification or any addition)

@vgaidarji
Copy link
Owner

vgaidarji commented Feb 20, 2020

@giorgosneokleous93 the problem with missing system image still exists. What were your testing steps?

docker build -t docker-android-emulator .
docker run docker-android-emulator
Warning: File /root/.android/.android/repositories.cfg could not be loaded.
[=======================================] 100% Unzipping... x86_64/encryptionkey
*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Running /opt/android-sdk/tools/bin/avdmanager create avd -f -n android-29 -k system-images;android-29;google_apis;x86_64

Auto-selecting single ABI x86_64========] 100% Fetch remote repository...
Do you wish to create a custom hardware profile? [no] *************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Running /opt/android-sdk/tools/bin/avdmanager list avd

Available Android Virtual Devices:
    Name: android-29
    Path: /root/.android/.android/avd/android-29.avd
  Target: Google APIs (Google Inc.)
          Based on: Android API 29 Tag/ABI: google_apis/x86_64
PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT
emulator:Auto-config: -force-32bit (ANDROID_EMULATOR_FORCE_32BIT=true)
emulator:Android emulator version 26.0.3.0 (build_id 3965150)
emulator:Found AVD name 'android-29'
emulator:Found AVD target architecture: x86_64
emulator:argv[0]: '/opt/android-sdk/tools/emulator'; program directory: '/opt/android-sdk/tools'
emulator:Cannot find system image path. Please define ANDROID_SDK_ROOT
emulator:Auto-config: -engine classic (based on configuration)

All proposed changes in PR make sense, we just need to improve further the configuration to make sure emulator is starting. I had a local branch on one of my working machines where I progressed on this, but didn't have time yet to fully finish that work or push to remote :(

@giorgosneokleous93
Copy link
Author

@vgaidarji I will close the PR if that's okay with you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants