自己做了一个简单的:

https://github.com/HBU/AndroidTest/tree/master/JsonWeatherInfoSimple

只是从网站读取JSON数据到本地,没有解析JSON格式。

涉及到联网和线程知识点,较为简单。

Android 天气预报 源代码

从GitHub上找了一个,边学边验证:

https://github.com/leeqibin/JsonWeather21

原有代码在AndroidManifest.xml配置文件的<application>标签中插入:

 android:usesCleartextTraffic="true"

这是Android P新增的安全要求~

涉及知识点:线程、联网、JSON、List、SQLite等。

原作者代码写的很好,跟着做一遍受益良多。

学习并验证后的代码:

https://github.com/HBU/AndroidTest/tree/master/JsonWeatherInfo

Android 天气预报 源代码

 

相关文章:

  • 2021-12-02
  • 2021-11-23
  • 2021-09-29
  • 2021-06-08
  • 2021-05-20
  • 2021-10-09
猜你喜欢
  • 2021-10-19
  • 2021-09-04
  • 2022-03-02
  • 2021-08-05
相关资源
相似解决方案