We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17320d7 commit 59540f2Copy full SHA for 59540f2
README.md
@@ -43,6 +43,10 @@ public class App extends Application {
43
44
@Override
45
public void handlerException(final Thread thread, final Throwable throwable) {
46
+ //开发时使用Cockroach可能不容易发现bug,所以建议开发阶段在handlerException中用Toast谈个提示框,
47
+ //由于handlerException可能运行在非ui线程中,Toast又需要在主线程,所以new了一个new Handler(Looper.getMainLooper()),
48
+ //所以千万不要在下面的run方法中执行耗时操作,因为run已经运行在了ui线程中。
49
+ //new Handler(Looper.getMainLooper())只是为了能弹出个toast,并无其他用途
50
new Handler(Looper.getMainLooper()).post(new Runnable() {
51
52
public void run() {
0 commit comments