gpt4 book ai didi

java - 什么是 com.android.tools.profiler.support.network.httpurl.HttpURLConnection?

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

com.android.tools.profiler.support.network.httpurl.HttpURLConnection 似乎被用来代替 java.net.HttpURLConnection(我在代码中使用) 当我使用 Android Studio 的分析器进行分析时。它是什么以及在哪里可以找到源代码?

我的目标是 API 23(compileSdkVersiontargetSdkVersion),minSdkVersion = 18

最佳答案

谷歌搜索“android profiler httplurlconnection”将我带到这个网站:

Inspect network traffic with Network Profiler | Android Developers

The Network Profiler displays realtime network activity on a timeline, showing data sent and received, as well as the current number of connections. This lets you examine how and when your app transfers data, and optimize the underlying code appropriately.

...

Currently, the Network Profiler supports only the HttpURLConnection and OkHttp libraries for network connections.

因此,此类会在分析器运行时替换 java.net.HttpURLConnection,以便它可以拦截和分析网络流量。

Android Studio is an open source project, see this SO question for links

关于java - 什么是 com.android.tools.profiler.support.network.httpurl.HttpURLConnection?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52947402/

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