skip to Main Content

Timber logs are not visible in Android Studio Dolphin 2021.3.1

Log Statements

Timber.d("onCreateViewCalled using Timber")
Log.d("Login", "onCreateViewCalled using Log")

OUTPUT

enter image description here

Only the Log library logs are visible and not the Timber ones.

2

Answers


  1. I have solved the issue by enabling Use libusb backend. Navigate to
    Android Studio -> Preferences -> Build, Execution, Deployment -> Debugger -> then check Use libusb backend

    enter image description here

    Login or Signup to reply.
  2. Added this for future reference

    You have to plant a timber debug tree by initializing Timber in the Application Class:

    class MyApplication : Application() {
        
        override fun onCreate() {
            super.onCreate()
        
            if(BuildConfig.DEBUG){
                Timber.plant(Timber.DebugTree())
            }
        }
    }
    

    Add the MyApplication class to the AndroidManifest.xml like below:

    <application
        android:name=".MyApplication">
    
        ...
    
    </application>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search