介绍
在开发过程中,我们经常见到LeakCanary或者BlockCanary。那么平常日志的打印我们怎样查看呢?通过这个工具,我们可以直观的看到日志效果,方便开发,调试以及测试。
效果展示
依赖
debugImplementation 'fairy.easy.logcanary:logcanary:{latestVersion}'
releaseImplementation 'fairy.easy.logcanary:logcanary-no-op:{latestVersion}'
//androidX使用
//debugImplementation 'fairy.easy.logcanary:logcanary-androidx:{latestVersion}'
调用方式
public class App extends Application {
@Override
public void onCreate() {
super.onCreate();
LogCanary.install(this);
}
}