Android Studio, logcat cleans after app closes

前端 未结 12 1850
耶瑟儿~
耶瑟儿~ 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:22

    I ran into the same problem and none of the answers could help me, until I realized my app was causing an OutOfMemoryException. That's a probable root cause as well.

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

    I had the same issue, but looks more like a feature than a bug:

    In AndroidStudio, the default setting for the Logcat window seems to be "Show only selected Application" (top right corner of the Logcat window)... which is looking at the log of the selected process (your current launch by default). So when your app crashes during testing, that process is gone, so the filter clears the log.

    Instead, select "Edit Filter Configuration..." and set up a filter for your app, eg:

    • FilterName: MyApp
    • PackageName: com.example.myapp (<< replace with your app's package name)

    ...and then select that filter for future runs. This should keep the log there for you, even after the app crashes.

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

    Might be very late to the party but I had the same problem and solved like this:

    In logcat window, top right corner drop-down menu select Edit filter configuration, on the next menu, introduce Filter name and your Package name.

    Done, for me it keeps logs visible after crashing.

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

    In Android Studio 2+

    1. Click Run

    2. Click Edit Configurations

    3. In the Run/Debug Configurations window select the Miscellaneous tab

    4. Make sure the Clear log before launch checkbox is not checked

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

    i have faced the same issue and this is the solution :-

    1- Tools --> Android --> Enable ADB Integration.

    and now you can see the logcat and the crashes as normal

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

    This bug seems to be fixed with the new release of Android Studio version 1.2.2

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