Seems it cannot work on Android Java project.
The sample App is Kotlin application. It can work as expected:
07-18 14:52:03.600 6523 6523 W PandaPearls: --------------------------
07-18 14:52:03.600 6523 6523 W PandaPearls: | ⚠️ Main Thread Warning
07-18 14:52:03.600 6523 6523 W PandaPearls: --------------------------
07-18 14:52:03.600 6523 6523 W PandaPearls: | Method: MainActivity.onCreate
07-18 14:52:03.600 6523 6523 W PandaPearls: | Took: 350 ms
07-18 14:52:03.600 6523 6523 W PandaPearls: --------------------------
07-18 14:52:03.671 6523 6523 W PandaPearls: --------------------------
07-18 14:52:03.671 6523 6523 W PandaPearls: | ⚠️ Main Thread Warning
07-18 14:52:03.671 6523 6523 W PandaPearls: --------------------------
07-18 14:52:03.671 6523 6523 W PandaPearls: | Method: MainActivity.onStart
07-18 14:52:03.671 6523 6523 W PandaPearls: | Took: 3 ms
07-18 14:52:03.671 6523 6523 W PandaPearls: --------------------------
07-18 14:52:12.084 6586 6586 W PandaPearls: --------------------------
07-18 14:52:12.084 6586 6586 W PandaPearls: | ⚠️ Main Thread Warning
07-18 14:52:12.084 6586 6586 W PandaPearls: --------------------------
07-18 14:52:12.084 6586 6586 W PandaPearls: | Method: MainActivity.onCreate
07-18 14:52:12.084 6586 6586 W PandaPearls: | Took: 391 ms
07-18 14:52:12.084 6586 6586 W PandaPearls: --------------------------
07-18 14:52:12.151 6586 6586 W PandaPearls: --------------------------
07-18 14:52:12.151 6586 6586 W PandaPearls: | ⚠️ Main Thread Warning
07-18 14:52:12.151 6586 6586 W PandaPearls: --------------------------
07-18 14:52:12.151 6586 6586 W PandaPearls: | Method: MainActivity.onStart
07-18 14:52:12.151 6586 6586 W PandaPearls: | Took: 3 ms
07-18 14:52:12.151 6586 6586 W PandaPearls: --------------------------
However, when I try to use it on one Android Java application, there is no any log for PandaPearls or PandaSpector. Could it work for Android Java applications? Thanks.
I have not tested on java android project but there are two things that should be checked if you are not getting logs:
- Do not minify while using this plugin.
- Check the package names list which you put in gradle while configuring this plugin.