Android Studio 1.2测试版正在调试中。

时间:2021-12-30 00:41:19

I’ve just upgraded Android Studio from version 1.0 to 1.2 beta and I can no longer perform any kind of debug operation. If I set a break point, Android Studio hangs and it can’t resolve the command:

我刚刚将Android Studio从1.0版升级到1.2版,我再也不能执行任何调试操作了。如果我设置一个断点,Android Studio挂起,它无法解析命令:

Waiting until last debugger command completes

but it never completes.

但它从来没有完成。

So, is it possible to downgrade to the previous stable version (1.0) without downloading again?

那么,是否有可能在不再次下载的情况下降级到以前的稳定版本(1.0)?

Thanks!

谢谢!

9 个解决方案

#1


15  

First Solution

第一个解决方案

1-Click file menu

1点击文件菜单

2-Click Invalidate Caches / Restart

2-单击Invalidate缓存/重新启动。

3-Click Invalidate And Restart

3-Click无效并重启

note : work in the same session only.

注意:只在同一会话中工作。

Second Solution

第二个解决方案

-Use GenyMotion Emulator With Android Version 5 or up.

-使用GenyMotion模拟器与Android版本5或以上。

Third Solution

第三种解决方案

-Use Android Studio 1.1 in my job my teammate use this version and it's okay .

-使用Android Studio 1.1在我的工作中,我的队友使用这个版本,没有问题。

the new debugger add variable value beside it in debugging steps it may cause the problem .

新的调试器在其旁边添加变量值,调试步骤可能会导致问题。

imagine that you watch all variables in debugging it should make problem. it's called Inline Debugger

假设您观察调试过程中的所有变量,它应该会产生问题。它被称为嵌入式调试器

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

下载到Android Studio 1.1: http://tools.android.com/download/studio/canary/1-0的链接

Third Solution is my own choice at work.

第三个解决方案是我自己在工作中的选择。

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

更新:我尝试了Android Studio 1.3预览版,但还是遇到了同样的问题。

Update: here in android studio info problem fixed link 1 link 2

更新:这里是android studio info问题修复链接1链接2

#2


6  

It looks like a bug in Android studio. It's reported here: https://code.google.com/p/android/issues/detail?id=73828

它看起来像是Android studio中的一个bug。据报道:https://code.google.com/p/android/issues/detail?id=73828

#3


4  

Here is an answer from Google regarding problems with current versions of Android Studio running with pre M version phones -

下面是谷歌关于当前版本的Android Studio使用pre M版本手机运行的问题的回答

For anyone else who might encounter this issue, here is a summary:

对于任何可能遇到这个问题的人,这里有一个总结:

The issue shows up in one of two ways: Studio will be responsive, but the debugger will be stuck at either "Collecting Data.." or "Waiting for last debugger command to complete..". This happens on both Dalivk and ART, so all versions of the platform are affected. The issue is more prevalent with Studio 1.2, but exists on all versions of Studio.

问题以两种方式之一出现:Studio将响应,但是调试器将被困在“收集数据..”或“等待最后一个调试器命令完成..”。这发生在Dalivk和ART上,因此平台的所有版本都受到影响。这个问题在Studio 1.2中更为普遍,但是在Studio的所有版本中都存在。

The correct fix for this issue is in the platform. The next version of M preview is likely to have this fix (in progress CL here: https://android-review.googlesource.com/#/c/152715/)

这个问题的正确解决方法在平台中。下一个版本的M预览版很可能会有这个补丁(在这个过程中,这里是https://android-review.googlesource.com/#/c/152715/)。

Until then we have some workarounds which reduce the probability of hitting this issue. So if you encounter this issue, you can try one of the following:

在此之前,我们有一些解决问题的方法。所以如果你遇到这个问题,你可以试试下面的方法:

  1. Change your breakpoint to only suspend the thread where it is hit rather than all threads. See comment #82 for more info on how to do this. The next release of Studio 1.2 and Studio 1.3 will be make this the default. (https://android-review.googlesource.com/#/c/152715/)

    将断点更改为仅挂起被击中的线程,而不是挂起所有线程。有关如何执行此操作的更多信息,请参见注释#82。Studio 1.2和Studio 1.3的下一个版本将使其成为默认版本。(https://android-review.googlesource.com/ / c / 152715 /)

  2. You can turn off various settings in the debugger that invoke methods: These include: a) inline debugging (https://www.jetbrains.com/idea/help/inline-debugging.html) b) "Enable 'toString()' object view" (Settings | Debugger | Data Views | Java) c) "Enable alternative view for Collections classes" (Settings | Debugger | Data Views | Java)

    您可以关闭调试器中调用方法的各种设置:a)内联调试(https://www.jetbrains.com/idea/help/inline-debug .html) b)“启用”toString()“对象视图”(设置|调试器|数据视图| Java)“为集合类启用可选视图”(设置|调试器|数据视图| Java)

The 2nd option is more severe (it limits the amount of automation the debugger does for you), so we are not enabling that by default. However, if you still see the issue after changing the suspend policy to thread only, then unfortunately, you'll have to do the steps in 2 as well.

第二个选项更加严格(它限制了调试器为您所做的自动化程度),因此我们在默认情况下不启用它。但是,如果您在将suspend策略更改为仅线程之后仍然看到这个问题,那么不幸的是,您还必须在2中执行这些步骤。

Finally, if you still see the issue after both, then that would be a new bug. Please file a new bug with a test case.

最后,如果您仍然在这两个问题之后看到这个问题,那么这将是一个新的错误。请用一个测试用例归档一个新的错误。

Thanks everyone for your patience and your help in providing us with repro cases and stack traces.

感谢大家的耐心和帮助,为我们提供repro case和堆栈跟踪。

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

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

#4


1  

This happened to me too.

这也发生在我身上。

I am running on a Mac so all I had to do was remove the Android Studio.app from /Applications and reinstall Android Studio although I reinstalled version 1.1.0

我在Mac上运行,所以我所要做的就是删除Android Studio。虽然我重新安装了1.1.0版,但应用程序和重新安装Android Studio。

I understand that the settings folder name changed from version 1.1.0 to 1.2 so that made the above possible.

我理解设置文件夹的名称从1.1.0版本更改为1.2版本,因此可以实现上面的操作。

#5


1  

Try to restart the Android Studio and the emulator if you're using one. This works for me

如果您正在使用Android Studio和模拟器,请尝试重新启动。这适合我

#6


1  

I'm still experiencing this problem, after the final release version. I found that restarting my PC solved it (for half of the day). This is not an ideal answer, as you're question is about downgrading, but if you're not too bothered at restarting your PC maybe twice a day, you might want to hang onto 1.2 till they fix it.

在最终的发布版本之后,我还在经历这个问题。我发现重启电脑解决了这个问题(半天)。这不是一个理想的答案,因为你的问题是关于降级,但是如果你不太介意重新启动你的电脑可能一天两次,你可能想坚持1.2,直到他们修复它。

#7


1  

Latest Android Studio changelog says it is fixed in version 1.3 Preview 3.

最新的Android Studio changelog表示,它已经在1.3版预览3中得到了修复。

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

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

Hooray!

万岁!

#8


0  

I have experienced the very same behaviour (Android Studio blocking in debug) and discovered that it does not seem to occur when using Nexus 7 with Android 5.1 installed. It does reproducibly occur on a SAMSUNG SM-T110 with Android 4.2.2. I habe never tested with an emulator however. This could mean, that the target device might be responsible for the hang.

我也经历过类似的行为(在调试中Android Studio阻塞),并发现在安装了Android 5.1的情况下使用Nexus 7时似乎不会出现这种情况。它可以在三星的SM-T110上与Android 4.2.2复制。我从来没有用模拟器测试过。这可能意味着,目标设备可能对挂起负责。

#9


-1  

Just unplug your USB connected device does the trick for me!

只要拔掉USB连接设备就可以帮我了!

#1


15  

First Solution

第一个解决方案

1-Click file menu

1点击文件菜单

2-Click Invalidate Caches / Restart

2-单击Invalidate缓存/重新启动。

3-Click Invalidate And Restart

3-Click无效并重启

note : work in the same session only.

注意:只在同一会话中工作。

Second Solution

第二个解决方案

-Use GenyMotion Emulator With Android Version 5 or up.

-使用GenyMotion模拟器与Android版本5或以上。

Third Solution

第三种解决方案

-Use Android Studio 1.1 in my job my teammate use this version and it's okay .

-使用Android Studio 1.1在我的工作中,我的队友使用这个版本,没有问题。

the new debugger add variable value beside it in debugging steps it may cause the problem .

新的调试器在其旁边添加变量值,调试步骤可能会导致问题。

imagine that you watch all variables in debugging it should make problem. it's called Inline Debugger

假设您观察调试过程中的所有变量,它应该会产生问题。它被称为嵌入式调试器

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

下载到Android Studio 1.1: http://tools.android.com/download/studio/canary/1-0的链接

Third Solution is my own choice at work.

第三个解决方案是我自己在工作中的选择。

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

更新:我尝试了Android Studio 1.3预览版,但还是遇到了同样的问题。

Update: here in android studio info problem fixed link 1 link 2

更新:这里是android studio info问题修复链接1链接2

#2


6  

It looks like a bug in Android studio. It's reported here: https://code.google.com/p/android/issues/detail?id=73828

它看起来像是Android studio中的一个bug。据报道:https://code.google.com/p/android/issues/detail?id=73828

#3


4  

Here is an answer from Google regarding problems with current versions of Android Studio running with pre M version phones -

下面是谷歌关于当前版本的Android Studio使用pre M版本手机运行的问题的回答

For anyone else who might encounter this issue, here is a summary:

对于任何可能遇到这个问题的人,这里有一个总结:

The issue shows up in one of two ways: Studio will be responsive, but the debugger will be stuck at either "Collecting Data.." or "Waiting for last debugger command to complete..". This happens on both Dalivk and ART, so all versions of the platform are affected. The issue is more prevalent with Studio 1.2, but exists on all versions of Studio.

问题以两种方式之一出现:Studio将响应,但是调试器将被困在“收集数据..”或“等待最后一个调试器命令完成..”。这发生在Dalivk和ART上,因此平台的所有版本都受到影响。这个问题在Studio 1.2中更为普遍,但是在Studio的所有版本中都存在。

The correct fix for this issue is in the platform. The next version of M preview is likely to have this fix (in progress CL here: https://android-review.googlesource.com/#/c/152715/)

这个问题的正确解决方法在平台中。下一个版本的M预览版很可能会有这个补丁(在这个过程中,这里是https://android-review.googlesource.com/#/c/152715/)。

Until then we have some workarounds which reduce the probability of hitting this issue. So if you encounter this issue, you can try one of the following:

在此之前,我们有一些解决问题的方法。所以如果你遇到这个问题,你可以试试下面的方法:

  1. Change your breakpoint to only suspend the thread where it is hit rather than all threads. See comment #82 for more info on how to do this. The next release of Studio 1.2 and Studio 1.3 will be make this the default. (https://android-review.googlesource.com/#/c/152715/)

    将断点更改为仅挂起被击中的线程,而不是挂起所有线程。有关如何执行此操作的更多信息,请参见注释#82。Studio 1.2和Studio 1.3的下一个版本将使其成为默认版本。(https://android-review.googlesource.com/ / c / 152715 /)

  2. You can turn off various settings in the debugger that invoke methods: These include: a) inline debugging (https://www.jetbrains.com/idea/help/inline-debugging.html) b) "Enable 'toString()' object view" (Settings | Debugger | Data Views | Java) c) "Enable alternative view for Collections classes" (Settings | Debugger | Data Views | Java)

    您可以关闭调试器中调用方法的各种设置:a)内联调试(https://www.jetbrains.com/idea/help/inline-debug .html) b)“启用”toString()“对象视图”(设置|调试器|数据视图| Java)“为集合类启用可选视图”(设置|调试器|数据视图| Java)

The 2nd option is more severe (it limits the amount of automation the debugger does for you), so we are not enabling that by default. However, if you still see the issue after changing the suspend policy to thread only, then unfortunately, you'll have to do the steps in 2 as well.

第二个选项更加严格(它限制了调试器为您所做的自动化程度),因此我们在默认情况下不启用它。但是,如果您在将suspend策略更改为仅线程之后仍然看到这个问题,那么不幸的是,您还必须在2中执行这些步骤。

Finally, if you still see the issue after both, then that would be a new bug. Please file a new bug with a test case.

最后,如果您仍然在这两个问题之后看到这个问题,那么这将是一个新的错误。请用一个测试用例归档一个新的错误。

Thanks everyone for your patience and your help in providing us with repro cases and stack traces.

感谢大家的耐心和帮助,为我们提供repro case和堆栈跟踪。

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

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

#4


1  

This happened to me too.

这也发生在我身上。

I am running on a Mac so all I had to do was remove the Android Studio.app from /Applications and reinstall Android Studio although I reinstalled version 1.1.0

我在Mac上运行,所以我所要做的就是删除Android Studio。虽然我重新安装了1.1.0版,但应用程序和重新安装Android Studio。

I understand that the settings folder name changed from version 1.1.0 to 1.2 so that made the above possible.

我理解设置文件夹的名称从1.1.0版本更改为1.2版本,因此可以实现上面的操作。

#5


1  

Try to restart the Android Studio and the emulator if you're using one. This works for me

如果您正在使用Android Studio和模拟器,请尝试重新启动。这适合我

#6


1  

I'm still experiencing this problem, after the final release version. I found that restarting my PC solved it (for half of the day). This is not an ideal answer, as you're question is about downgrading, but if you're not too bothered at restarting your PC maybe twice a day, you might want to hang onto 1.2 till they fix it.

在最终的发布版本之后,我还在经历这个问题。我发现重启电脑解决了这个问题(半天)。这不是一个理想的答案,因为你的问题是关于降级,但是如果你不太介意重新启动你的电脑可能一天两次,你可能想坚持1.2,直到他们修复它。

#7


1  

Latest Android Studio changelog says it is fixed in version 1.3 Preview 3.

最新的Android Studio changelog表示,它已经在1.3版预览3中得到了修复。

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

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

Hooray!

万岁!

#8


0  

I have experienced the very same behaviour (Android Studio blocking in debug) and discovered that it does not seem to occur when using Nexus 7 with Android 5.1 installed. It does reproducibly occur on a SAMSUNG SM-T110 with Android 4.2.2. I habe never tested with an emulator however. This could mean, that the target device might be responsible for the hang.

我也经历过类似的行为(在调试中Android Studio阻塞),并发现在安装了Android 5.1的情况下使用Nexus 7时似乎不会出现这种情况。它可以在三星的SM-T110上与Android 4.2.2复制。我从来没有用模拟器测试过。这可能意味着,目标设备可能对挂起负责。

#9


-1  

Just unplug your USB connected device does the trick for me!

只要拔掉USB连接设备就可以帮我了!