Httpurlconnection.getoutputstream () IO exception
Baidu, did not find the answer you want. Online solutions are almost from the authority to consider the ~ finally find a foreign site to find the answer ~
Http://stackoverflow.com/questions/23582621/httpurlconnection-getoutputstream-throws-ioexception
In fact, the report IO exception means that you use the UI process to access the network and add post data, resulting in an exception. At this point you need to write the code that you access the network to a thread and there is no such problem.
Required Rights statement:
<uses-permission android:name= "Android.permission.INTERNET"/> <uses-permission android:name= " Android.permission.WRITE_EXTERNAL_STORAGE "/> <uses-permission android:name=" android.permission.READ_ External_storage "/>
Code to access the network:
New Thread (new Runnable () { @Override publicvoid run () { access Network ~ /// CODING ..... } }). Start ();
This problem is more difficult for beginners to find out ~
"Android Development" Httpurlconnection.getoutputstream () IO exception