Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio debugging "threads" window keeps refreshing

It's content flashes then showing "Collecting data", again and again. No way to view, never say interract. How to fix this? Can I control the target via jdb simultaneously and how? Android Studio version is 3.5.3. Thanks!

like image 399
Roney Avatar asked Jan 19 '20 09:01

Roney


People also ask

How do I debug a multithreaded application?

You've now learned the basics of debugging multithreaded apps. You can observe, flag and unflag, and freeze and thaw threads by using the Threads window, the Thread list in the Debug Location toolbar, or thread markers in the source code editor. Use Threads to examine and control threads.

How do I debug a thread in Visual Studio Code?

While in break mode, open the Threads window by selecting Debug > Windows > Threads. You must be in a debugging session to open or see the Threads and other debugging windows. In the source code, locate the Console.WriteLine (); line. Right-click in the Threads window, and select Show Threads in Source from the menu.

What is the use of thread in Android Studio?

This thread is very important because it is in charge of dispatching events to the appropriate user interface widgets, including drawing events. It is also almost always the thread in which your application interacts with components from the Android UI toolkit (components from the android.widget and android.view packages).

Are Android view objects thread-safe?

By design, Android View objects are not thread-safe. An app is expected to create, use, and destroy UI objects, all on the main thread. If you try to modify or even reference a UI object in a thread other than the main thread, the result can be exceptions, silent failures, crashes, and other undefined misbehavior.


1 Answers

This sounds like a memory cache issue. Try to invalidate cache and restart. That should fix it.

File > Invalidate cache and restart

like image 62
Taslim Oseni Avatar answered Nov 15 '22 08:11

Taslim Oseni