HonyComb and DefaultHttpClient

后端 未结 4 881
情话喂你
情话喂你 2020-12-03 11:29

In my code I have this

        Log.d(\"WFlog (executeRequest)\", request.toString()) ;
        httpResponse = client.execute(request);  
        Log.d(\"WFlo         


        
4条回答
  •  -上瘾入骨i
    2020-12-03 12:15

    There are new policies that allow application and operating system developers to set performance expectations for code executing on certain threads. You've attempted to invoke blocking network api's on the ui thread of your application. Google has put in place a system that lets you know this is a bad idea and you can resolve this issue by executing your request in a separate thread or an asyncTask.

    Please read this blog post. You can find information about doing async / multi-threaded apps all over SO and Google.

提交回复
热议问题