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
Please sign in to leave a comment.
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).
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.
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
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?
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.
https://youtrack.jetbrains.com/issue/IDEA-299045
At the moment AVD manager is not available in projects with no android facet
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 ?
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.
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:
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.
I see the bug was created. I'm using bazel, so no facets for me (unless I've missed something in the integration).
Karsten Silz Let me take a look.
Arina Efremova Thank you!
BTW: The issue you listed yesterday (IDEA-298708) still isn't a valid link to me.
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.
Arina Efremova
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?
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.
Thanks, I updated IDEA-299158 👌
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.
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.
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
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: