Bootstrap

HighLight.js 使用Demo

复制下面代码,保存为html,浏览器打开预览即可。

 

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8">  
</head>
<body>
<link href="http://cdn.bootcss.com/highlight.js/8.0/styles/monokai_sublime.min.css" rel="stylesheet">  
<script src="http://cdn.bootcss.com/highlight.js/8.0/highlight.min.js"></script>  
<script >hljs.initHighlightingOnLoad();</script>  
<pre><code class="lang-java">
SuperCatch Crash!!!
====================Crash日志开始记录====================
Crash Time: 2017-12-20 06:08:51
Crash Thread: main
Crash Digest: java.lang.IllegalStateException: Could not execute method for android:onClick
Crash StackTrace: java.lang.IllegalStateException: Could not execute method for android:onClick
    at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:293)
    at android.view.View.performClick(View.java:5646)
    at android.view.View$PerformClick.run(View.java:22459)
    at android.os.Handler.handleCallback(Handler.java:761)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:156)
    at android.app.ActivityThread.main(ActivityThread.java:6523)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:288)
    ... 9 more
Caused by: java.lang.NullPointerException: Wa Null Point Exception
    at me.chunsheng.supercatch.MainActivity.crashTest(MainActivity.java:19)
    ... 11 more

******Crash设备当前信息******
Device Name: HUAWEI EVA-AL00
Android Version: 7.0
Device System: EVA-AL00C00B398
Device Battery: 100 %
Device Rooted: no
Device Ram: 43.0% [2.00 GB]
Device Disk: 73.0% [25.00 GB]
App Verion: 1.0
Device Network: WIFI
====================Crash日志结束记录====================
</code></pre>
</body>
</html>

 

;