2.1 如何打开Profiler-网络分析剖析起
- 依次选择 View > Tool Windows > Profiler 或点击工具栏中的 Profile图标
- 点击 NETWORK 时间轴上的任意位置以打开内存性能分析器
2.2 网络设置
MainActivity
val httpAsync = “https://httpbin.org/get”
.httpGet()
.responseString { request, response, result ->
print(response)
}
httpAsync.join()
SecondActivity
val httpAsync = “https://www.wanandroid.com/banner/json”
.httpGet()