zoukankan      html  css  js  c++  java
  • java.lang.NullPointerException 错误处理

    04-07 15:26:52.784: E/AndroidRuntime(19878): FATAL EXCEPTION: main
    04-07 15:26:52.784: E/AndroidRuntime(19878): Process: com.anzi.jmsht, PID: 19878
    04-07 15:26:52.784: E/AndroidRuntime(19878): java.lang.NullPointerException
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at com.anzi.jmsht.adpater.AppListViewAdapter$2.onClick(AppListViewAdapter.java:575)
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at android.view.View.performClick(View.java:4505)
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at android.view.View$PerformClick.run(View.java:18898)
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at android.os.Handler.handleCallback(Handler.java:808)
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at android.os.Handler.dispatchMessage(Handler.java:103)
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at android.os.Looper.loop(Looper.java:193)
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at android.app.ActivityThread.main(ActivityThread.java:5499)
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at java.lang.reflect.Method.invokeNative(Native Method)
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at java.lang.reflect.Method.invoke(Method.java:515)
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:838)
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:654)
    04-07 15:26:52.784: E/AndroidRuntime(19878):  at dalvik.system.NativeStart.main(Native Method)

    com.anzi.jmsht.adpater.AppListViewAdapter$2.onClick(AppListViewAdapter.java:575)中的代码:

    -->574       startAPP((String) model.getItem("appackage"));

    -->575       dialog.cancel();

    解决办法:

    -->574      startAPP((String) model.getItem("appackage"));
    -->575             if(dialog!=null){
    -->576                 dialog.cancel();
    -->577                   }

  • 相关阅读:
    websocket 心跳及重连
    Liunx下 tomcat自动重启脚本,亲测。
    Node.js 安装配置---菜鸟教程,贼好用
    Linux下安装Perl依赖
    Centos 8 虚拟机访问外网
    以后园子可能用的就比较少了qwq
    酒店之王
    git bash here创建项目时无法使用上下箭头
    Win10搭建IIS实现局域网访问网站
    js判断两个对象是否相同的三种方式
  • 原文地址:https://www.cnblogs.com/childhooding/p/4398470.html
Copyright © 2011-2022 走看看