Android Emulator No Longer Starts

625 views
Skip to first unread message

Jeff Mikels

unread,
Mar 20, 2021, 4:09:04 PM3/20/21
to Flutter Development (flutter-dev)
My Flutter workflow was going well until I updated Android Studio today.

I know this isn't a forum for Android Studio, but I also know that Flutter people are some of the smartest people around and you might have a solution for me.

I'm running macOS Mojave (10.14.16) (because I need 32-bit compatibility at least for now), and I was doing fine with Android Studio 3.x, but today, I installed 4.1.3, and now my emulator won't launch.

In Android Studio, I get zero helpful information regarding why it won't launch, but if I launch the emulator using the Flutter command line, I get this error:

joshua:~ jeff$ flutter emulators --launch Android
The Android emulator exited with code -6 during startup
Android emulator stderr:
dyld: Library not loaded: /System/Library/Frameworks/IOUSBHost.framework/Versions/A/IOUSBHost
  Referenced from: /Volumes/Jeff/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64
  Reason: image not found
Address these issues and try again.

Looking in /System/Library/Frameworks/ I can confirm that IOUSBHost.framework is not there, and I don't think it was introduced into macOS until Mojave.

Does anyone have any ideas? I'm currently trying to downgrade my Android Studio back to 3.1, so we will se where that gets us, but I really would like to be on 4.x if possible.

Jeff Mikels

unread,
Mar 20, 2021, 6:48:06 PM3/20/21
to Flutter Development (flutter-dev)
As a workaround, I was able to successfully downgrade android emulator to 28.


I downloaded 28.0.25.0 (build_id 5395263) from here:


I deleted everything EXCEPT package.xml from

    $HOME/Library/Android/sdk/emulator/

and replaced them with the contents of the extracted zip file.

Finally, make sure your AVD system image is NOT running api 30.

    sdkmanager "system-images;android-27;google_apis_playstore;x86"

System images higher than api 29 are using a kernel format that the older emulator cannot understand.

Here's a workaround script you can try:

    cd ~
    mkdir emulator_downgrade
    cd emulator_downgrade
    unzip emulator-darwin-5395263.zip
    mv ~/Library/Android/sdk/emulator ~/Library/Android/sdk/previous-emulator
    mv emulator ~/Library/Android/sdk/emulator
    cp ~/Library/Android/sdk/previous-emulator/package.xml 
    ~/Library/Android/sdk/emulator/package.xml
    cd ~
    ~/Library/Android/sdk/emulator/emulator -version
    ~/Library/Android/sdk/emulator/emulator -list-avds

Jeff Mikels

unread,
Mar 20, 2021, 6:48:50 PM3/20/21
to Flutter Development (flutter-dev)
I have submitted an Android Studio issue here: https://issuetracker.google.com/issues/183218284

Benedicte Roussel

unread,
Mar 21, 2021, 7:53:32 PM3/21/21
to Flutter Development (flutter-dev), Jeff Mikels
very strange idea to downgrade

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/flutter-dev/b7f08171-6d6c-4b8d-88a2-4d9f5717e26dn%40googlegroups.com
.
Reply all
Reply to author
Forward
0 new messages