new a AsyncTask cause 'Can't create handler inside thread that has not called Looper.prepare()'
2014-05-09 16:39
246 查看
Can't create handler inside thread that has not called Looper.prepare()
There are a few threading rules that must be followed for this class to work properly:
The AsyncTask class must be loaded on the UI thread. This is done automatically as of
The task instance must be created on the UI thread.
be invoked on the UI thread.
Do not call
The task can be executed only once (an exception will be thrown if a second execution is attempted.)
There are a few threading rules that must be followed for this class to work properly:
The AsyncTask class must be loaded on the UI thread. This is done automatically as of
JELLY_BEAN.
The task instance must be created on the UI thread.
execute(Params...)must
be invoked on the UI thread.
Do not call
onPreExecute(),
onPostExecute(Result),
doInBackground(Params...),
onProgressUpdate(Progress...)manually.
The task can be executed only once (an exception will be thrown if a second execution is attempted.)
相关文章推荐
- VC GDI+: error C2660: 'new' : function does not take 3 parameters
- What's New in the .NET Framework 2.0 Beta
- 【Android开发日记】jsonObject = new JSONObject(info)报错 A JSONObject text must begin with '{' at character
- 创建触发器时出现 PLS-00049: 错误的赋值变量 ':NEW.land_name'
- VC GDI+: error C2660: 'new' : function does not take 3 parameters
- error C2065: 'DEBUG_NEW' : undeclared identifier?
- "today's topic is 'new age'"
- GETBOUNDINGCLIENTRECT CAUSES 'UNSPECIFIED ERROR' IN IE7 AFTER AJAX in Jquery 1.4.2
- xfire webservice异常 java.lang.IllegalStateException: Can't overwrite cause
- window平台下 Eclipse Ndk开发中的Method 'NewStringUTF' could not be resolved问题
- 【思维】About ‘New Oriental Way'
- Could not load file or assembly ' .dll_newdevelop' or one of its dependencies 解决办法
- "What's New" WebPart in SharePoint
- 在New comers' training 上听到Microsoft的六个价值观
- python manag.py syncdb不能成功创建表 Run 'manage.py makemigrations' to make new migrations,
- Error:Cause: failed to find target with hash string 'N' in: F:\Androidstudio\android-sdk-windows <a
- Cause life's like this
- 微软VC各版本BUG: error C2660: 'new' : function does not take 3 parameters
- new year's resolutions
- Why doesn't my new Favicon display?