Label2ReasonAndSolution.json 7.5 KB

123456789101112131415161718
  1. {"id":"5c19c18813a96846ccafe758","label":"忽略","reasons":["非异常"],"solutions":["非异常"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  2. {"id":"5c19c18813a96846ccafe759","label":"其他","reasons":["其他"],"solutions":["其他"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  3. {"id":"5c19c18813a96846ccafe75a","label":"空指针异常","reasons":["调用空对象的方法或属性"],"solutions":["方法对传入参数判空后再使用"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  4. {"id":"5c19c18813a96846ccafe75b","label":"java超时异常","reasons":["阻塞操作超时时抛出异常"],"solutions":["查看相关阻塞操作"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  5. {"id":"5c19c18813a96846ccafe75c","label":"Socket超时异常","reasons":["1、在OkHttp处理 HTTP/2 的逻辑 (okhttp3.internal.http2.Http2Stream) 中,会由于读超时、写超时而抛出该异常。","2、在 Android 中,java.net.PlainSocketImpl 的 accept(SocketImpl newImpl) 执行失败,如果 errno 为 EAGAIN 将抛出该异常,如果使用 nio 的 ServerSocketChannelImpl,异常将不会被实际抛出;","3、此外,在阻塞 Socket 上读取长度为 0 的数据时抛出此异常。","4、libcore.io.IoBridge 中,TCP 连接建立超时,将抛出该异常。libcore.io.IoBridge 中,接收数据失败,会由于 errno 为 EAGAIN 抛出该异常。","5、在 external/conscrypt/src/main/native/org_conscrypt_NativeCrypto.cpp 中执行 SSL/TLS 握手动作、数据读操作或数据写操作超时,会抛出该异常"],"solutions":["查看Socket相关操作"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  6. {"id":"5c19c18813a96846ccafe75d","label":"Socket异常","reasons":["1、java.net.SocketException: Connection refused: connect: connect,发生在客户端进行new Socket(ip, port)操作时,该异常发生的原因是或者具有ip地址的机器不能找到","2、java.net.SocketException: Socket is closed,该异常在客户端和服务器均可能发生。异常的原因是己方主动关闭了连接后(调用了Socket的close方法)再对网络连接进行读写操作","3、java.net.SocketException: (Connection reset或者Connect reset by peer:Socket write error),该异常在客户端和服务器端均有可能发生,连接断开后的读和写操作引起的","4、java.net.SocketException: Broken pipe,该异常在客户端和服务器均有可能发生,在第4个异常的第一种情况中(也就是抛出 SocketExcepton:Connect reset by peer:Socket write error后),如果再继续写数据则抛出该异常"],"solutions":["检查socket操作,前两个异常的解决方法是首先确保程序退出前关闭所有的网络连接,其次是要检测对方的关闭连接操作,发现对方关闭连接后自己也要关闭该连接。"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  7. {"id":"5c19c18813a96846ccafe75e","label":"域名解析失败","reasons":["网络断开;DNS 服务器意外挂掉;DNS 服务器故障"],"solutions":["1、在Android项目中的AndroidManifest.xml中添加访问网络的权限(\u003cuses-permissionandroid:name=\"android.permission.INTERNET\"/\u003e)","2、访问网站已经倒闭/关闭或者不存在,可以在浏览器中验证一下","3、无法解析该域名,可以将域名对应的ip写入到hosts文件中保存"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  8. {"id":"5c19c18813a96846ccafe75f","label":"状态错误","reasons":["error state"],"solutions":["查看状态操作"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  9. {"id":"5c19c18813a96846ccafe760","label":"权限获取错误","reasons":["未授权相应权限"],"solutions":["对相应权限进行授权,例如授予写权限:\u003cuses-permission android:name=\"android.permission.WRITE_SETTINGS\"/\u003e"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  10. {"id":"5c19c18813a96846ccafe761","label":"参数异常","reasons":["传入参数与需要的参数不匹配"],"solutions":["查看所需要的参数和传入的参数,确保一致"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  11. {"id":"5c19c18813a96846ccafe762","label":"文件未找到","reasons":["未在指定路径找到文件,文件可能不存在或者没有访问权限"],"solutions":["1、查看相应的文件是否存在,若存在查看是否具有访问的权限","2、检查一下android api 的版本和模拟器的版本是否一致","3、检查xml文件中的tag标签是不是成对出现","4、检查AndroidMainfest.xml文件中的是否漏加了相应的活动事件\u003cactivity\u003e或者是在java文件中修改了类名而忘了在xml文件中改回来"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  12. {"id":"5c19c18813a96846ccafe763","label":"选择无效的索引","reasons":["invalid selected index"],"solutions":["查看index可选值"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  13. {"id":"5c19c18813a96846ccafe764","label":"找静态元数据条目出错","reasons":["Error finding static metadata entry,出现过在华为手机"],"solutions":["查看元数据"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  14. {"id":"5c19c18813a96846ccafe765","label":"JSON解析异常","reasons":["解析JSON对象时出错,可能尝试获取JSON中不存在的属性"],"solutions":["查看JSON对象解析过程"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  15. {"id":"5c19c18813a96846ccafe766","label":"中断异常","reasons":["当另一个线程通过调用 Thread.interrupt() 中断一个线程时,会出现以下两种情况之一。如果那个线程在执行一个低级可中断阻塞方法,例如 Thread.sleep()、 Thread.join() 或 Object.wait(),那么它将取消阻塞并抛出 InterruptedException"],"solutions":["如果抛出 InterruptedException 意味着一个方法是阻塞方法,那么调用一个阻塞方法则意味着您的方法也是一个阻塞方法,而且您应该有某种策略来处理 InterruptedException"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  16. {"id":"5c19c18813a96846ccafe767","label":"DeadObjectException异常","reasons":["该异常表示对应的服务或对象已经停止,但是却仍有对其发起调用","1.数据库,蓝牙等用已调用过close()的对象来connect(),将会报错","2.引用被系统回收的对象,也会报这个错误","3.大多数设备没有root权限,有的开发者希望制造系统级错误强迫Android系统自动重启"],"solutions":["建议在服务终止或对象回收后把相应的引用置空,并且在所有可能用到这个对象的地方进行判空操作"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  17. {"id":"5c19c18813a96846ccafe769","label":"SSL错误","reasons":["1.SSL/TLS 握手失败,协议协商失败或证书验证失败等","2.连接超时、连接重置、连接被关闭"],"solutions":["检查SSL连接"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}
  18. {"id":"5c80b3d2e81aa5349790034a","label":"文件读写权限错误","reasons":["manifest中配置的权限问题,主线程进行数据操作这样的写法不安全 读取和写入文件一般大多是由于这个原因引起的"],"solutions":["在manifest配置中添加相应权限"],"_class":"net.mooctest.middle.bean.LogHandler.Label2ReasonAndSolution"}