Urlconnection Doesn't Work Since Api 10 And Higher?
Hey I'm having a big issue with my android App. I'm currently updating it and I switched from API 8 to API 10 and the following block of code doesn't work anymore ... URL url = new
Solution 1:
I never faced that problem but I think the stacktrace is telling you what is wrong: NetworkOnMainThreadException
Seems like android OS is forbidding a synchronous HTTP request on the main thread, because this will block the UI. So it seems to prevent you from making bad decisions (good idea I think). You should use an AsyncTask for network requests anyway.
Post a Comment for "Urlconnection Doesn't Work Since Api 10 And Higher?"