question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot resolve method 'plant(timber.log.Timber.DebugTree)'

See original GitHub issue
  • Android Studio version: Android Studio Bumblebee | 2021.1.1 Patch 1 (Build #AI-211.7628.21.2111.8139111)
  • Timber version: com.jakewharton.timber:timber:5.0.1

Reproduction steps:

  1. Simply add the above dependency to an Android project (ensuring to use Android Studio Bumblebee+)
  2. Observe the Cannot resolve method 'plant(timber.log.Timber.DebugTree)' Lint error message:

image

Additional notes:

  • Didn’t seem to occur on prior version of Android Studio (Arctic Fox and prior).
  • Does seem to affect Android Studio Bumblebee (Stable), Chipmunk (Beta) and Dolphin (Canary).
  • Doesn’t appear to occur with pre-5.0.0 versions of Timber.
  • Loosely related to this issue.
  • Could be an Android Studio bug rather than a bug with Timber, though I figured best to report it here as it doesn’t seem to affect pre-5.0.0 versions of Timber as mentioned previously.
  • In case the issue is in fact with Android Studio, @gmk57 has reported it on Android Studio bug tracker.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:12
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
uvery9commented, Mar 13, 2022

Convert Java File to Kotlin File can easily solve the problem. image

4reactions
gmk57commented, Feb 14, 2022

This only happens when calling from Java.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot resolve method 'plant(timber.log.Timber.DebugTree)'
It means that something is out of sync. Similar things happen to me occasionally with Android Studio. Try exiting AS and restarting it....
Read more >
Lint incorrectly reports "Cannot resolve method" for Timber ...
We're using Timber as a logger. Calling Timber.plant(new Timber.DebugTree());. from Java is highlighted with. Cannot resolve method 'plant(timber.log.
Read more >
Planting Timber logs the right way - Section.io
This article will discuss the best practices in using Timber and planting the Timber trees . Requirements. To tag along with this tutorial ......
Read more >
timber.log.Timber.plant java code examples - Tabnine
Thrown when a hostname can not be resolved. Deque (java.util). A linear collection that supports element insertion and removal at both ends. The...
Read more >
Better Logging In Android Using Timber | by Sidhant Rajora
Once the project is synced just plant a timber debug tree in the Application class, because as per the instruction on Timber's github...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found