美文网首页
Android调试工具-Stecho

Android调试工具-Stecho

作者: 河马过河 | 来源:发表于2018-09-06 09:34 被阅读24次

一、Stecho使用

1、使用Stecho调试工具前提条件:Android App + OKHTTP请求+Chrome浏览器

2、引入依赖

    implementation 'com.facebook.stetho:stetho:1.5.0'
    implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'

3、OKHTTP添加拦截器

 builder.addNetworkInterceptor(new StethoInterceptor());

4、Application 中Stecho的初始化

   Stetho.initializeWithDefaults(this);

5、打开Chrome浏览器:chrome://inspect/

河马过河微信公众号.jpg

相关文章

网友评论

      本文标题:Android调试工具-Stecho

      本文链接:https://www.haomeiwen.com/subject/ijutgftx.html