<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
first of all, above use-permission must be set.
if Post request still return "UnknownHostException", you 've set the following :
<uses-permission android:name="android.permission.INTERNET" />
what if all setting are done, you find the issue which is not done, you must check your wifi is open or not?
Note that , If you are using the emulator (Nox). You had better try to restart your emulator. like that, this exeception can be solved.