Android 原生的 HttpURLConnection 工具 在 WebView 中显示,使用loadData(html,"text/html","utf8")方法 ;html
摘自 《Android 并发开发》git
快速入门 http://square.github.io/okhttp/ 托管网页 https://github.com/square/okhttp 在Android的Module的Gradle 脚本中添加依赖 dependencies{ implementation 'com.squareup.okhttp3:okhttp:4.0.1' }github
注意Retrofit是基于OkHttp建立的,比OkHttp使用简单一些; 官网 http://square.github.io/retrofit/网络