Android 将文本设置为警报对话框

Android 将文本设置为警报对话框,android,dialog,set,alert,Android,Dialog,Set,Alert,我想将文本设置为警报对话框,但我遇到了一些问题 final EditText input = new EditText(this); input.setText(user_descript,TextView.BufferType.EDITABLE); //error alert.setView(input); 我的错误是: EditText类型中的方法setText(CharSequence,TextView.BufferType)不适用于参数(

我想将文本设置为警报对话框,但我遇到了一些问题

        final EditText input = new EditText(this);
        input.setText(user_descript,TextView.BufferType.EDITABLE); //error
        alert.setView(input);
我的错误是:

EditText类型中的方法setText(CharSequence,TextView.BufferType)不适用于参数(TextView,TextView.BufferType)

为警报对话框生成的EditText似乎不接受设置文本


有人知道解决方案吗?

错误表明您正在使用TextView和TextView.BufferType作为参数调用setText。。如何声明用户描述?您是否使用了错误的变量???读取错误。您试图将
文本视图
传递到需要
字符序列
的方法中。您的权限@alanv谢谢。