Android Studio, logcat cleans after app closes

前端 未结 12 1851
耶瑟儿~
耶瑟儿~ 2020-12-02 06:16

I\'m having a problem with my logcat since update 1.2 Beta for Android Studio. When I run my app it logs everything like it normally did, then I get at the point where my ap

相关标签:
12条回答
  • 2020-12-02 06:38

    I'm Working with Android Studio 4.0 enter image description here

    1. Go to Edit Configuration of your app.
    2. Go to Miscellaneous Tab
    3. Uncheck the field Clear log before launch.
    4. Press OK. It'll work..
    0 讨论(0)
  • 2020-12-02 06:39

    It is 2018 and this can still happen. Close Android Studio and reopen.

    0 讨论(0)
  • 2020-12-02 06:41

    Switch "Show only selected application" to "No filters". This way, you can see logcat output from a process even when that process isn't running.

    The downside is that your logcat will be filled with more spam from other processes.

    0 讨论(0)
  • 2020-12-02 06:44

    My App was crashing and restarting. I also had some problems on reading the logcat to know what was happening. I then noticed that in the drop down menu, next to the Device dropdown it had something like "com.mypackage.myapp ('some number')" and when my app crashed there was another option that said "com.mypackage.myapp ('some number') [DEAD]". If you select the "Dead" option, it will show you the logcat of the previous instance.

    0 讨论(0)
  • 2020-12-02 06:47

    In case of crash see the Run tab at the bottom of IDE.

    You can see the crash reason in this part (even in logcat clean case).

    Note: If the above trick not works try to produce a crash and immediately disconnect the mobile cable (if you use the real device for the test). you can see the error before it cleaned.

    Update: If also above trick not works, try to attach and detach phone and hopefully problem solved.

    Update2: If again not work, try to Invalidate catches and Restart then start debugging again.

    Update3: As The last way, try to remove the app and install it again then start debugging (if you do not lose that condition you want to test)

    0 讨论(0)
  • 2020-12-02 06:47

    The filter clears the log once the app gets crashed. So select "Edit Filter Configuration" and create your own custom filter with filter name. This will save the log with informations even when the app is crahed.

    0 讨论(0)
提交回复
热议问题