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 }