Android Studio 1.2 beta freezes when debugging

I just updated Android Studio from version 1.0 to 1.2 beta, and I can no longer perform any debugging operation. If I set a breakpoint, Android Studio freezes and cannot resolve this command:

Waiting until last debugger command completes 

but it never ends.

So, is it possible to go to the previous stable version (1.0) without reloading?

Thank!

+49
android debugging android-studio hang
Apr 03 '15 at 10:22
source share
9 answers

First decision

1-Click Menu

2-Click Invalidate Caches / Restart

3-Click Invalidate And Restart

Note: work in only one session.

Second solution

-Use the GenyMotion emulator with Android version 5 or higher.

Third decision

-Use Android Studio 1.1 in my work, my teammate uses this version, and everything is fine.

the new debugger adds the value of the variable next to it in the debugging steps, this can cause a problem.

Imagine that you are observing all the variables when debugging, this should make the problem. it's called inline debugger

Download the link to Android Studio 1.1: http://tools.android.com/download/studio/canary/1-1-0

The third solution is my own choice at work.

Update: I tried Android Studio 1.3 Preview , but still have the same problem.

Update: here in android studio the problem is fixed link 1 link 2

+15
May 13 '15 at 16:28
source share

Sounds like a bug in android studio. He reported here: https://code.google.com/p/android/issues/detail?id=73828

+6
Apr 29 '15 at 22:48
source share

Here's a response from Google about issues with current versions of Android Studio that work with phones up to version M -

For anyone who might run into this problem, here is a summary:

The problem occurs in one of two ways: Studio will respond, but the debugger will be stuck in "Data collection .." or "Waiting to complete the last debugger command ..". This happens on both Dalivk and ART, so all versions of the platform are affected. The problem is more common in Studio 1.2, but exists in all versions of Studio.

The correct fix for this problem is on the platform. The next version of Preview M will probably have this fix (in the CL process here: https://android-review.googlesource.com/#/c/152715/ )

Until then, we have some workarounds that reduce the chance of hitting this issue. Therefore, if you encounter this problem, you can try one of the following:

  • Change the breakpoint to pause the thread it hit, not all threads. See Comment # 82 for more information on how to do this. The next release of Studio 1.2 and Studio 1.3 will do this by default. ( https://android-review.googlesource.com/#/c/152715/ )

  • You can disable various settings in the debugger that the methods call: they include: a) built-in debugging ( https://www.jetbrains.com/idea/help/inline-debugging.html ) b) "Enable" toString () "View objects "(Settings | Debugger | Data Views | Java) c)" Enable an alternative view for collection classes "(Settings | Debugger | Data Views | Java)

The second option is more strict (it limits the amount of automation the debugger does for you), so we do not enable this by default. However, if you still see the problem after changing the suspension policy for streaming only, then, unfortunately, you will need to take steps 2 as well.

Finally, if you still see the problem after both, then this will be a new error. Please write a new error in the test case.

Thank you all for your patience and your help in providing us with reproductions and stack traces.

https://code.google.com/p/android/issues/detail?id=172523

+4
Aug 18 '15 at 8:12
source share

It happened to me.

I work on a Mac, so I needed to remove Android Studio.app from / Applications and reinstall Android Studio, although I reinstalled version 1.1.0

I understand that the settings folder name has changed from version 1.1.0 to 1.2 to make this possible.

+1
Apr 04 '15 at 16:16
source share

Try restarting Android Studio and the emulator if you are using it. It works for me

+1
Apr 10 '15 at 4:11
source share

I am still experiencing this problem after the final release. I found that restarting my PC solved it (for half a day). This is not an ideal answer, since you doubt the downgrade, but if you are not too worried about restarting your computer, perhaps twice a day, you may need to insert it at 1.2 until they fix it.

+1
May 6 '15 at 12:32
source share

The latest update to Android Studio indicates that it has been fixed in version 1.3 of Preview 3.

http://tools.android.com/recent/androidstudio13preview3nowavailable

Hurrah!

+1
Jun 10 '15 at 11:16
source share

I experienced the same behavior (blocking Android Studio when debugging) and found that this did not happen when using Nexus 7 with Android 5.1 installed. It plays on SAMSUNG SM-T110 with Android 4.2.2. However, I have never tested the emulator. This may mean that the target device may be responsible for freezing.

0
Apr 27 '15 at 9:19
source share

Just disconnect the device connected to the USB device, this is a trick for me!

-one
Jun 26 '15 at 5:41
source share



All Articles