Why this doesn't work for ICS [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Strange NetworkOnMainThreadException in Android app? Trying To Upload To Dropbox: NetworkOnMainThreadException? I have used the below code for reading HTML contents from a url. This works perfectly for 2.3.3 but when I try to run the same code it doesn't work for ICS. I am trying to append these html contents on to a edittext . But it always remains empty when I run the code on ICS. What may be the problem?