The application may be doing too much work on its main thread

前端 未结 17 1847
挽巷
挽巷 2020-11-21 07:34

I am new to Android SDK/API environment. It\'s the first I am trying to draw a plot/chart. I tried running different kinds of sample codes the emulator using 3 different fre

17条回答
  •  感动是毒
    2020-11-21 08:18

    I am not an expert, but I got this debug message when I wanted to send data from my android application to a web server. Though I used AsyncTask class and did the data transfer in background, for getting the result data back from server I used get() method of the AsyncTask class which makes the UI synchronous which means that your UI will be waiting for too long. So my advice is to make your app do every network oriented tasks on a separate thread.

提交回复
热议问题