Java.lang.IllegalStateException:Target host must not is NULL, or set in parameters.
Reason:
The connection address is not complete, you must add "http://".
===============================================================
Java.net.UnknownHostException:Host is unresolved:www.baidu.com
This error is often encountered when Android is developed, and in general there are two most common scenarios that cause this error:
1.android Device Network connection not open, such as 3G Network and WiFi network
So, if you encounter this error, check to see if your network is connected properly.
2.Manifest file does not indicate network access rights
If you confirm that the network is connected properly and this error, then please see if your manifest file indicates that the application requires network access, if not indicated, also can not access the network, it will also cause this situation.
Network access rights
<uses-permission android:name= "Android.permission.INTERNET"/>
================================================================