gpt4 book ai didi

Android Studio 网络分析器

转载 作者:搜寻专家 更新时间:2023-11-01 07:45:26 24 4
gpt4 key购买 nike

有没有一种简单的方法可以在 Android Studio 中监控网络流量?我正在寻找 Firefox 或 Chrome 控制台的等效项,您可以在其中查看 REST HTTP 调用:请求、响应和 header 。我已尝试使用 ADM(Android 设备监视器)和“网络统计信息”,但看不到我的 HTTP 调用的详细信息。

最佳答案

根据Android Official ,它仅适用于使用 HttpURLConnection 和 OKHttp 库的应用程序。如果您正在使用其他网络库或遗留的 apache HttpClient。无法捕获网络流量。

Network connection troubleshooting If the Network Profiler detects traffic values, but cannot identify any supported network requests, you will receive the following error message:

"Network Profiling Data Unavailable: There is no information for the network traffic you've selected."

Currently, the Network Profiler supports only the HttpURLConnection and OkHttp libraries for network connections. If your app uses another network connection library, you may not be able to view your network activity in the Network Profiler. If you have received this error message, but your app does use HttpURLConnection or OkHttp, please report a bug, or search the issue tracker to include your feedback in an existing report that's related to your issue. You can also use these resources to request support for additional libraries.

关于Android Studio 网络分析器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45410980/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com