错误提示:
09-13 14:59:32.462 7428-7452/com.chen.zhou.myapplication4 E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.chen.zhou.myapplication4, PID: 7428
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
at android.os.Handler.(Handler.java:200)
at android.os.Handler.(Handler.java:114)
at android.app.Activity.(Activity.java:754)
at android.support.v4.app.BaseFragmentActivityGingerbread.(BaseFragmentActivityGingerbread.java:34)
at android.support.v4.app.BaseFragmentActivityHoneycomb.(BaseFragmentActivityHoneycomb.java:29)
at android.support.v4.app.BaseFragmentActivityJB.(BaseFragmentActivityJB.java:29)
at android.support.v4.app.FragmentActivity.(FragmentActivity.java:75)
at android.support.v7.app.AppCompatActivity.(AppCompatActivity.java:61)
at com.chen.zhou.myapplication4.ItemBean.(ItemBean.java:8)
at com.chen.zhou.myapplication4.MainActivity.getItemBean(MainActivity.java:58)
at com.chen.zhou.myapplication4.MainActivity.access$000(MainActivity.java:22)
at com.chen.zhou.myapplication4.MainActivity$NewAsyncTask.doInBackground(MainActivity.java:38)
at com.chen.zhou.myapplication4.MainActivity$NewAsyncTask.doInBackground(MainActivity.java:34)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
09-13 14:59:33.123 7428-7455/com.chen.zhou.myapplication4 E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7f40c7d1a010