CrashWoodpecker

enframe_2015-09-02-17-51-03

因为我的 Android Studio 在使用的过程中, 经常会出现 App 崩溃了, 而 AS 自带的 logcat 并没有搜集到异常信息, 特别烦恼, 怎么折腾怎么重连都不痛快, 特别是对于那种 “启动崩” 的异常, 很难马上捕捉到, 丢失也是经常的.

所以我做了这么一个库, 仿造 Square 检测并展示内存泄露的 LeakCanary. 当开发过程中, 如果有没有处理的异常导致 crash, 使用了 CrashWoodpecker 以后, 便会起一个新的美观页面, 以很友好的方式即时展示异常信息. 更多内容可以参看一下我写在 GitHub 的文档:

CrashWoodpecker

An uncaught exception handler library like Square’s LeakCanary.

Getting started

NOTE: There is a big bug before VERSION 0.9.5, QAQ thank goodness, it has been fixed in version 0.9.5, please update to 0.9.5+.

In your build.gradle:

dependencies {
  debugCompile 'me.drakeet.library:crashwoodpecker:0.9.7'
  releaseCompile 'me.drakeet.library:crashwoodpecker-do-nothing:0.9.7'
}

In your Application class:

public class ExampleApplication extends Application {

  @Override public void onCreate() {
    super.onCreate();
    CrashWoodpecker.fly().to(this);
  }
}

And in your AndroidManifest.xml file:

<application
    android:name=".ExampleApplication" // <-- 
    ...
    ...>
</application>

That is all! CrashWoodpecker will automatically show an Activity when your app crash with uncaught exceptions in your debug build.

7BDF054B-21AE-4A66-ACBF-6A51B1A0FA96

Demo apk download: LittleWood.apk

源代码: https://github.com/drakeet/CrashWoodpecker

  1. 刚刚把你Git上的代码跑起来了。但是运行会卡死。我先打开Woodpecker,然后缩小,再打开LittleWood,然后点Crash就卡死了。。话说,我也是锤子手机……

    • 确实是啄木鸟兼容性的问题, 已经解决了, 你再试试, 这是我写在 github 的提示…: NOTE: There is a big bug before VERSION 0.9.5, QAQ thank goodness, it has been fixed in version 0.9.5, please update to 0.9.5, or wait for the update …

  2. 有的异常不能捕捉吧,,比如自定义的控件,因为复制别人的,包名忘了改了,,他不报错,屏幕闪了几次没了。。
    顺道请教下,这东西咋弄的,可以在手机上装一个app。啥原理啊

    • 不好意思,弄错了那不是新的app。就是2个启动页而已,有点傻了

  3. Pingback: Skydiving NYC

  4. Pingback: What you can do with coconut oil

  5. Pingback: garcinia cambogia extract does it work

  6. Pingback: How are contributions made to the 403b account

  7. Pingback: double glazing windows prices

  8. Pingback: pickleball ball

  9. Pingback: hotels burlington

  10. Pingback: water slide

  11. Pingback: hotels in rocky mount nc

  12. Pingback: interserver coupon

  13. Pingback: how to

  14. Pingback: read more

  15. Pingback: useful reference

  16. Pingback: my company

  17. Pingback: a fantastic read

  18. Pingback: original site

  19. Pingback: why not try these out

  20. Pingback: look at this site

  21. Pingback: check these guys out

  22. Pingback: you can try this out

  23. Pingback: additional hints

  24. Pingback: hop over to this website

  25. Pingback: More Bonuses

  26. Pingback: Continued

  27. Pingback: Discover More

  28. Pingback: pop over to this website

  29. Pingback: see post

  30. Pingback: look here

  31. Pingback: read more

  32. Pingback: best info

  33. Pingback: new website

  34. Pingback: news

  35. Pingback: how to

  36. Pingback: about

  37. Pingback: useful reference

  38. Pingback: imp source

  39. Pingback: a fantastic read

  40. Pingback: my response

  41. Pingback: i thought about this

  42. Pingback: check these guys out

  43. Pingback: view publisher site

  44. Pingback: why not find out more

  45. Pingback: their explanation

  46. Pingback: Visit Website

  47. Pingback: her latest blog

  48. Pingback: More Bonuses

  49. Pingback: check that

  50. Pingback: you could check here

  51. Pingback: you could try here

  52. Pingback: Learn More

  53. Pingback: official statement

  54. Pingback: important source

  55. Pingback: click here

  56. Pingback: read more

  57. Pingback: click here

  58. Pingback: click here

  59. Pingback: click here

  60. Pingback: read more

  61. Pingback: read more

  62. Pingback: read more

  63. Pingback: read more

  64. Pingback: click here

  65. Pingback: read more

  66. Pingback: more news

  67. Pingback: check this link right here now

  68. Pingback: official site

  69. Pingback: check these guys out

  70. Pingback: her latest blog

  71. Pingback: Clicking Here

  72. Pingback: More hints

  73. Pingback: best value

  74. Pingback: new source

  75. Pingback: best news

  76. Pingback: learn now

  77. Pingback: Give Her Makeup.com

  78. Pingback: click here

  79. Pingback: read more

  80. Pingback: important

  81. Pingback: find

  82. Pingback: figure out

  83. Pingback: continue reading

  84. Pingback: what to do

  85. Pingback: where to look

  86. Pingback: insight

  87. Pingback: quality article

  88. Pingback: quality article

  89. Pingback: Sperry boots for women

  90. Pingback: useful reference

  91. Pingback: i thought about this

  92. Pingback: their explanation

  93. Pingback: Homepage

  94. Pingback: a fantastic read

  95. Pingback: find this

  96. Pingback: browse this site

  97. Pingback: my response

  98. Pingback: i thought about this

  99. Pingback: why not try these out

  100. Pingback: More hints

  101. Pingback: Get the facts

  102. Pingback: you could look here

  103. Pingback: try this web-site

  104. Pingback: explanation

  105. Pingback: discover this info here

  106. Pingback: minigun for sale

  107. Pingback: sperrys review

  108. Pingback: read more

  109. Pingback: check my blog

  110. Pingback: More about the author

  111. Pingback: click site

  112. Pingback: my review here

  113. Pingback: get redirected here

  114. Pingback: useful reference

  115. Pingback: Get More Info

  116. Pingback: how to get bigger boobs in a week

  117. Pingback: how to get bigger boobs

  118. Pingback: this website

  119. Pingback: great post to read

  120. Pingback: my company

  121. Pingback: imp source

  122. Pingback: find more info

  123. Pingback: see it here

  124. Pingback: Homepage

  125. Pingback: a fantastic read

  126. Pingback: find this

  127. Pingback: Bonuses

  128. Pingback: read this article

  129. Pingback: browse this site

  130. Pingback: check here

  131. Pingback: original site

  132. Pingback: my response

  133. Pingback: this page

  134. Pingback: navigate to this website

  135. Pingback: news

  136. Pingback: have a peek at these guys

  137. Pingback: have a peek at these guys

  138. Pingback: click here

  139. Pingback: click here

  140. Pingback: click here

  141. Pingback: click here

  142. Pingback: read more

  143. Pingback: read more

  144. Pingback: what is new

  145. Pingback: what is new

  146. Pingback: what is new

  147. Pingback: what is new