Open amuyu opened 7 years ago
In case of network connection failure, VolleyError.networkResponse is null. If it is null, App crach occurs.
10-19 14:46:36.691 31111-31195/com.morihacky.android.rxjava E/routes: com.android.volley.NoConnectionError: java.net.UnknownHostException: Unable to resolve host "www.weather.com.cn": No address associated with hostname 10-19 14:46:36.700 31111-31111/com.morihacky.android.rxjava E/VolleyDemoFragment: com.android.volley.NoConnectionError: java.net.UnknownHostException: Unable to resolve host "www.weather.com.cn": No address associated with hostname
So, A null validation of the response is required.
In case of network connection failure, VolleyError.networkResponse is null. If it is null, App crach occurs.
So, A null validation of the response is required.