我正在设计一个发送邮件的应用程序.全部都已设置但是当代码到达emmulator中的以下行时,它显示"应用程序已意外停止"并且日志cat显示NullPointerException.我也发现了尽可能多的权限.Plz帮助我了解清单文件中必须给出的具体权限以及如何解决问题.
startActivity(Intent.createChooser(send, "This is the chooser title"));
Run Code Online (Sandbox Code Playgroud)
发送是我的意图.
完整的log cat msg如下:
11-01 23:21:37.721: W/IInputConnectionWrapper(442): showStatusIcon on inactive InputConnection
11-01 23:21:39.781: I/msg(442): this is offhook
11-01 23:21:43.991: I/msg(442): this is idle
11-01 23:21:43.991: I/msgfinal(442): this is it
11-01 23:21:43.991: I/msg(442): this is from msg
11-01 23:21:43.991: I/sha(442): here
11-01 23:21:43.991: D/AndroidRuntime(442): Shutting down VM
11-01 23:21:43.991: W/dalvikvm(442): threadid=1: thread exiting with uncaught exception (group=0x40015560)
11-01 23:21:43.991: E/AndroidRuntime(442): FATAL EXCEPTION: main
11-01 23:21:43.991: E/AndroidRuntime(442): java.lang.NullPointerException
11-01 23:21:43.991: E/AndroidRuntime(442): at android.app.Activity.startActivityForResult(Activity.java:2827)
11-01 23:21:43.991: …Run Code Online (Sandbox Code Playgroud)