lygttpod / AndroidMonitor

easy show android okhttp request data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

不会使用

weishuiliang opened this issue · comments

1、你说的依赖在哪里添加?monitor接入
2、我打开其他的APP或浏览器都没有抓取到数据,我不知道你这工具怎么用,难道只能发送测试数据?

commented

哪个项目需要接入就在哪个项目中添加依赖

1、monitor接入

在APP的build.gradle中添加依赖

   debugImplementation 'io.github.lygttpod:monitor:0.0.9'

-备注: 使用debugImplementation是为了只在测试环境中引入

2、monitor-plugin接入

  1. 根目录build.gradle下添加如下依赖
    buildscript {
        dependencies {
            ......
            //monitor-plugin需要
            classpath 'io.github.lygttpod:monitor-plugin:0.0.2'
        }
    }

2.添加插件

    在APP的build.gradle中添加:

    //插件内部会自动判断debug模式下hook到okhttp
    apply plugin: 'monitor-plugin'

commented

不是抓别人项目的数据 抓自己项目的数据哦

是不是加上这些配置后 要重新打包成apk ?

commented

是的,打debug包,抓包插件只会在debug包下生效