这将引发空指针异常并使应用程序崩溃。想不通为什么。这可能是因为一些时髦的线程业务。我在想也许处理程序可能会解决它。如果有人有任何想法,我会在此期间尝试一下。谢谢
以下是我得到的错误:
06-04 15:42:34.644: W/dalvikvm(6535): threadid=1: thread exiting with uncaught exception (group=0x40dca438)
传播错误的代码:
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
// Get the layout inflater
LayoutInflater inflater = getActivity().getLayoutInflater();
builder.setView(inflater.inflate(R.layout.my_layout, null));
Log.i(TAG, "Getting TextView and appending");
((TextView) findViewById(R.id.tvName)).append("appended string");
builder.create().show();