Search code examples
javaandroidandroid-studioideandroid-logcat

LogCat doesn't show my own logs in real device


I have little test app in Android Studio with strange behavior regarding LogCat: For example I have logs like this:

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.d(TAG, "onCreate(Bundle) called");
        ...

If I try to start my app in emulator, all my logs work fine. But if I try to start my app on a real device, I can see a lot of system logs from my device(for example from BatteryService), but there are none of my own logs here.

I have enabled ADB integration and source of logs in LogCat choosed right(my device).


Solution

  • I found problem. Strange behavior of LogCat was because of API version of my device Android was lower than required API version of my app.