How can I fix "Attach a Debugger or ESC to Cancel" error?

Viewed 2871

I use Android Studio Chipmunk | 2021.2.1 Patch 2. My OS is win 8.1 Pro. Emulator is Pixel XL API 25. I have JDK-18.0.2 Even there is not any connected phone to my computer I get "Attach a Debugger or ESC to Cancel" error. Emulator doesn't come online. It doesn't work. I have searched and almost tried every solution on stackoverflow. Still getting the same error.

Gradle Settings

Gradle User Home: C:\Users\UserName\.gradle

Use Gradle From: 'gradle-wrapper.properties' file

Gradle JDK: Android Studio Default JDK version 11.0.12

JAVA_HOME: C:\Program Files\Java\jdk-17.0.2\bin (also tried C:\Program Files\Java\jdk-18.0.2\bin)

What should I do?

Thank you for responses.

4 Answers

Install newest update to android emulator 31.3.10 . Then restart computer and after showing window with "Attach a Debugger or ESC to Cancel" press ESC button ... Android emulator will start .

enter image description here

Second

Delete all android virtual devices and install them again

It's only a bug , probably will be solved by Google

maybe you have 2 different versions of adb.exe
if you are a windows user, open task manager and find adb.exe in the process list, right-click on it and choose Open File Location, remove that folder or move it to a temporary place,(make sure you killed adb.exe using task manager before moving it).
then run the emulator again and see if it works or not.

I was also getting the same error when I was selecting Api level 30 or above while creating emulator. After selecting Api level 27 or below its working fine.

same problem but my emulator is working fine use android 9.0 and pivel 3 api 28 the dailog box "attach a debugger or esc to cancel " occur but emulator work you need to cancel this dailog box --->> use android 9.0 and pixel 3 api 28 emulator

Related