IntelliJ 2022.2 Ultimate: Android Device Manager can't start simulators anymore

Answered

I have two Android emulators defined. Starting them fails from IntelliJ and succeeds in Android Studio. Is this the best place to ask for help about this?

Here's what happens: When I start an emulator from IntelliJ, the emulator window briefly opens up, then closes again. The emulator starts - I can see it running in the activity monitor. But it's missing its window.

The same emulator starts fine from Android Studio - the emulator window stays up.

Here are my installation details:

M1 MacBook Pro 16
macOS 12.5

IntelliJ IDEA 2022.2 (Ultimate Edition)
Build #IU-222.3345.118, built on July 26, 2022
Runtime version: 17.0.3+7-b469.32 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.5
GC: G1 Young Generation, G1 Old Generation
Memory: 6192M
Cores: 10
Metal Rendering is ON
Registry:
    ide.mac.alt.mnemonic.without.ctrl=false
    debugger.watches.in.variables=false
    ide.allow.merge.buttons=false
    ide.balloon.shadow.size=0

Non-Bundled Plugins:
    net.seesharpsoft.intellij.plugins.csv (2.19.0)
    indent-rainbow.indent-rainbow (2.0.2)
    com.tabnine.TabNine (0.7.11)
    google-java-format (1.15.0.0)
    com.dubreuia (2.3.0)
    bundled-intellij-idea-help (222.3345.118)
    com.intellij.plugins.webcomponents (222.3345.108)
    Gitflow-Fix (0.7.10)
    Dart (222.3345.108)
    io.flutter (69.0.5)
    CMD Support (1.0.5)
    org.mapstruct.intellij (1.3.1)
    zielu.gittoolbox (212.9.7)
    izhangzhihao.rainbow.brackets (6.25)
    lermitage.intellij.extra.icons (2022.1.7)

Kotlin: 222-1.7.10-release-334-IJ3345.118
2
22 comments

I found this even though my problem seems different.  For me, Android Device Manager won't even open.  I've confirmed I have the emulator installed via the Android SDK manager, but when I click Tools > Android > Device Manager nothing happens (no errors either).  

3

The Android Device Manager changed with both IntelliJ 2022.2 and recent Android Studio versions. On my Mac, at least, the Device Manager launched as a non-IDE window. And the emulators were stand-alone windows, too. Now the Android Device Manager and the emulator are regular IDE tool windows.

0

I'm facing the same issue, Device Manager window can't even open. I'm using Windows OS. My IJ version: Build #IU-222.3345.118, built on July 26, 2022

0

Might be https://youtrack.jetbrains.com/issue/IDEA-298708

Karsten Silz Benjamin Leitner Djachowicz

Could you guys please check if it only happens in IntelliJ IDEA in non-Android projects  (e.g. Java, Flutter, etc.)?

What I mean is, if you create an Android project with File | New | Project | Android, do you have the same problem there?

0

Arina Efremova thanks for your replay,

In my case the problem happens in Java/Maven project.
When I create an Android project, then I am able to open Device Manger tab and run emulator.

Could you point me please the issue link again ? The one you have sent (IDEA-298708) is not found (404) I'm afraid.

0

https://youtrack.jetbrains.com/issue/IDEA-299045

At the moment AVD manager is not available in projects with no android facet

0

Andrei Kuznetsov

Since last year I've been using this in Java/Maven project. After upgrade to the newest IJ version it doesn't work anymore. Does it mean this feature is no longer available ? Or will be fixed soon ?

0

Andrei Kuznetsov You're right - AVD manager doesn't show without the Android facet. I learned the hard way because occasionally, that Facet disappears in my project. 😒

Anyhow, my issue is that the AVD manager shows but doesn't work - see above.

0

Here are some more details about the event. I just stopped the Android emulator running in Android Studio. I then started the same emulator from IntelliJ. Just as before, the Android emulator window briefly shows and disappears maybe two seconds after the emulator started. The emulator runs afterward - I can see it in the activity monitor.

Here are the notifications:

And here's from the log file:

2022-08-01 21:47:00,249 [27993343]   INFO - #i.f.r.d.FlutterAppDaemonEventListener - app shutdown took longer than 100ms
2022-08-01 21:47:00,335 [27993429]   INFO - #i.f.r.d.FlutterApp - StopApp y_mobile_next (Debug)
2022-08-01 21:47:02,755 [27995849]   WARN - #c.a.ddmlib - Adb connection Error:EOF
2022-08-01 21:47:02,758 [27995852]   WARN - #c.a.ddmlib - Unable to open connection to ADB server: java.io.IOException: Can't find adb server on port 5037, IPv4 attempt: Connection refused, IPv6 attempt: Connection refused
2022-08-01 21:47:02,758 [27995852]   WARN - #c.a.ddmlib - Failed to start monitoring emulator-5554
2022-08-01 21:47:02,760 [27995854]   WARN - #c.a.ddmlib - Cannot reach ADB server, attempting to reconnect.
2022-08-01 21:47:03,959 [27997053]   INFO - #c.a.t.i.a.AdbService - Terminating ADB connection
2022-08-01 21:47:04,790 [27997884]   INFO - #c.a.t.i.a.AdbService - ADB connection successfully terminated
2022-08-01 21:47:04,790 [27997884]   INFO - #c.a.t.i.a.AdbService - Initializing adb using: /Users/karsten/Library/Android/sdk/platform-tools/adb
2022-08-01 21:47:04,814 [27997908]   WARN - #c.a.ddmlib - * daemon not running; starting now at tcp:5037
2022-08-01 21:47:04,929 [27998023]   WARN - #c.a.ddmlib - * daemon started successfully
2022-08-01 21:47:04,931 [27998025]   INFO - #c.a.ddmlib - Connected to adb for device monitoring
2022-08-01 21:47:05,135 [27998229]   INFO - #c.a.t.i.a.AdbService - Successfully connected to adb
2022-08-01 21:47:06,584 [27999678]   INFO - #i.f.r.d.DeviceDaemon - flutter device daemon #1: Error 1 retrieving device properties for sdk gphone arm64:
2022-08-01 21:47:06,584 [27999678]   INFO - #i.f.r.d.DeviceDaemon - flutter device daemon #1: adb: device 'emulator-5554' not found

2022-08-01 21:47:07,518 [28000612]   INFO - #c.a.t.i.d.p.DeviceManagerAndroidDebugBridge - []
2022-08-01 21:47:13,411 [28006505]   INFO - Emulator: Pixel 2 API 30 - /Users/karsten/Library/Android/sdk/emulator/emulator -netdelay none -netspeed full -avd Pixel_2_API_30 -qt-hide-window -grpc-use-token -idle-grpc-timeout 300
2022-08-01 21:47:13,677 [28006771]   WARN - Emulator: Pixel 2 API 30 - unexpected system image feature string, emulator might not function correctly, please try updating the emulator.
2022-08-01 21:47:13,864 [28006958]   WARN - Emulator: Pixel 2 API 30 - cannot add library /Users/karsten/Library/Android/sdk/emulator/qemu/darwin-aarch64/lib64/vulkan/libvulkan.dylib: failed
2022-08-01 21:47:13,919 [28007013]   INFO - Emulator: Pixel 2 API 30 - Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_posture_requested(int) ((null):0, (null))
2022-08-01 21:47:13,919 [28007013]   INFO - Emulator: Pixel 2 API 30 - 
2022-08-01 21:47:13,919 [28007013]   INFO - Emulator: Pixel 2 API 30 - Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_posture_selection_dialog() ((null):0, (null))
2022-08-01 21:47:13,919 [28007013]   INFO - Emulator: Pixel 2 API 30 - 
2022-08-01 21:47:13,919 [28007013]   INFO - Emulator: Pixel 2 API 30 - Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_resizable_requested(PresetEmulatorSizeType) ((null):0, (null))
2022-08-01 21:47:13,919 [28007013]   INFO - Emulator: Pixel 2 API 30 - 
2022-08-01 21:47:13,919 [28007013]   INFO - Emulator: Pixel 2 API 30 - Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_resizable_dialog() ((null):0, (null))
2022-08-01 21:47:13,919 [28007013]   INFO - Emulator: Pixel 2 API 30 - 
2022-08-01 21:47:13,919 [28007013]   INFO - Emulator: Pixel 2 API 30 - added library /Users/karsten/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
2022-08-01 21:47:13,919 [28007013]   INFO - Emulator: Pixel 2 API 30 - configAndStartRenderer: setting vsync to 60 hz
2022-08-01 21:47:13,933 [28007027]   INFO - #c.a.t.i.d.p.PhysicalDeviceChangeListener - emulator-5554 connected
2022-08-01 21:47:13,933 [28007027]   INFO - Emulator: Pixel 2 API 30 - Started GRPC server at 127.0.0.1:8554, security: Local+token
2022-08-01 21:47:13,933 [28007027]   INFO - Emulator: Pixel 2 API 30 - Advertising in: /Users/karsten/Library/Caches/TemporaryItems/avd/running/pid_87022.ini
2022-08-01 21:47:14,143 [28007237]   INFO - Emulator: Pixel 2 API 30 - Your emulator is out of date, please update by launching Android Studio:
2022-08-01 21:47:14,143 [28007237]   INFO - Emulator: Pixel 2 API 30 - - Start Android Studio
2022-08-01 21:47:14,143 [28007237]   INFO - Emulator: Pixel 2 API 30 - - Select menu "Tools > Android > SDK Manager"
2022-08-01 21:47:14,143 [28007237]   INFO - Emulator: Pixel 2 API 30 - - Click "SDK Tools" tab
2022-08-01 21:47:14,143 [28007237]   INFO - Emulator: Pixel 2 API 30 - - Check "Android Emulator" checkbox
2022-08-01 21:47:14,143 [28007237]   INFO - Emulator: Pixel 2 API 30 - - Click "OK"
2022-08-01 21:47:14,143 [28007237]   INFO - Emulator: Pixel 2 API 30 - 
2022-08-01 21:47:14,794 [28007888]   INFO - #c.a.t.i.d.p.PhysicalDeviceChangeListener - emulator-5554 state changed to null
2022-08-01 21:47:14,800 [28007894]   INFO - #c.a.t.i.d.p.PhysicalDeviceChangeListener - emulator-5554 state changed to OFFLINE
2022-08-01 21:47:14,800 [28007894]   INFO - #c.a.t.i.d.p.PhysicalDeviceChangeListener - emulator-5554 state changed to ONLINE
0

Arina Efremova Yep, the error stays the same: Created a new Android project, started the emulator, the emulator window closes after a second or two, but emulator runs in the end (activity monitor). Same as with my Flutter project.

0

I see the bug was created.  I'm using bazel, so no facets for me (unless I've missed something in the integration).

0

Arina Efremova Thank you! 

BTW: The issue you listed yesterday (IDEA-298708) still isn't a valid link to me.

0

Karsten Silz

IDEA-298708's visibility is restricted, but it is a duplicate of IDEA-299045, so you can follow that instead.

Judging by the log output, both IDEA and Android Studio were open the moment you started the emulator in IDEA. Both IDEs use the same ADB port, and both of them initiate ADB restart whenever there's an issue (it is a known problem, a solution to which would be starting the ADB server manually, and specifying the port in Settings | Build, Execution, Deployment | Debugger | 'ADB server lifecycle management' > 'Use existing...').

Try closing all of the instances of all your IDEs, opening a single instance of IDEA, and reproducing the problem. If it persists, try updating the version of the emulator.

If the above doesn't help, please provide the resulting archive of the Help | Collect Logs and Diagnostic Data operation. You can upload it privately to https://uploads.jetbrains.com, and provide the upload id.

0

Arina Efremova

  • IDEA-299045 is not my problem, I manually added the Android facet to my Flutter project.
  • Even with IntelliJ running as the only IDE (no Android Studio, no Data Grip), the error persists: I start the emulator, the emulator window closes after a second or two, but the emulator runs in the end (as the activity monitor shows).
  • Here's my upload ID: 2022_08_02_5z8NcT2WEieu2fLy9U5TTN (file: idea-logs-20220802-1113215097782358400404297.zip)

 

 

0

Thank you Karsten Silz

I created a new bug report for your problem, and asked the developer responsible for Android integration in IntelliJ IDEA to look into it:

Just to confirm, did you try updating the emulator?

0

Arina Efremova I update the emulator through IntelliJ/Android Studio with the "Check For Updates..." menu option. Both said no updates were available. I don't think I'm supposed to install the emulator separately.

0

Arina Efremova I was wrong: The "SDK Tools" tab of the Android SDK settings did indeed show an update for the Android SDK Build Tools, which I installed. I don't think that was the reason, though - Android Studio used the same emulator and worked fine. Let's call it confusing that I do "Check for Updates..." in IntelliJ, and it shows no updates, but the Android SDK has its own set of update controls hidden away...

Anyhow, I think this is mostly a PICNIC: If I manually open the emulator tool window in IntelliJ after the emulator started, the emulator shows just fine! Such a simple solution - and I didn't think of it... 😩

So the one small issue is that the emulator tool window closes in IntelliJ when launching but not in Android Studio, so idiots like myself complain because they can't open the tool window. 😒 I updated IDEA-299158.

0

Don't be hard on yourself Karsten🌼 If all UI in all of our products was 100% intuitive, we'd be living in the year 3022.

0

How do you open the emulator window? I don't see it anywhere within Idea and it's not showing by itself even though I start it via "open android emulator" in my flutter project. I'm on a Mac and activity monitor is showing qemu-system process running

0

Hello Ppp123qqq777. Which IDE version do you use? When I open a Flutter project in the latest IntelliJIDEA 2023.1.3, the Android Emulator and Device Manager toolwindows appear on the right sidebar:

0

Please sign in to leave a comment.