概述
#1楼 @极客学院-Ukey 我也是按照教程中的代码,也崩溃,,,下面是报的错 请问老师是什么原因
10-23 11:55:49.277 4873-4896/com.wk.myapplication E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #4
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:299)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
at java.util.concurrent.FutureTask.run(FutureTask.java:239)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
at android.os.Handler.(Handler.java:197)
at android.os.Handler.(Handler.java:111)
at android.widget.Toast$TN.(Toast.java:324)
at android.widget.Toast.(Toast.java:91)
at android.widget.Toast.makeText(Toast.java:238)
at com.wk.myapplication.MainActivity$3.doInBackground(MainActivity.java:79)
at com.wk.myapplication.MainActivity$3.doInBackground(MainActivity.java:67)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)
最后
以上就是殷勤朋友为你收集整理的android录像时报fatal exception: main,按照视频中代码,出现FATAL Exception :AsyncTask #1的全部内容,希望文章能够帮你解决android录像时报fatal exception: main,按照视频中代码,出现FATAL Exception :AsyncTask #1所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复