What does "cannot be resolved to a type" mean, and how can I fix it? Java Android 4.0 -


this (supposed be) simple example of implementing dialog in android 4.0. method oncreatedialog() overrides method of same name imported android.app.dialog; code won't compile , generates error message shown in comment below. error message mean , how can fix it? thanks!

@override protected dialog oncreatedialog(int id) {     switch (id) {     case 0:         return new alertdialog.builder(this)         .seticon(r.drawable.ic_launcher)         .settitle("this dialog stupid message...")         .setpositivebutton("dig it",  //error message: //dialoginterface.onclicklistener cannot resolved type             new dialoginterface.onclicklistener() {                 public void onclick(dialoginterface dialog, int whichbutton)                 {                     toast.maketext(getbasecontext(),                             "gotcha!", toast.length_short).show();                 }             }         ) 

as error trying tell you, there no type named dialoginterface.onclicklistener.

java case-sensitive; you need capital o.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -