java - "The type of the expression must be an array type but it resolved to TextView" -
i'm having issue compiling bit of source code , i'm getting error stating "the type of expression must array type resolved textview" i've attempted on both google , stackoverflow , returning 1 (unanswered) result.
can either point me in right direction or give example of how issue can resolved?
much appreciated. - tim
i have 2 instances of error on following 2 lines:
beammsg[i].settext(new string(msg[i].getrecords()[1].getpayload())); beammsg2[i].settext(new string(msg[i].getrecords()[1].getpayload()));
source:
void processintent(intent intent) { parcelable[] rawmsgs = intent.getparcelablearrayextra( nfcadapter.extra_ndef_messages); // 1 message sent during beam ndefmessage[] msg = new ndefmessage[rawmsgs.length]; (int = 0; < msg.length; i++) { msg[i] = (ndefmessage) rawmsgs[i]; // record 0 contains mime type, record 1 aar, if present beammsg[i].settext(new string(msg[i].getrecords()[1].getpayload())); beammsg2[i].settext(new string(msg[i].getrecords()[1].getpayload())); }}
you trying call settext() method on object beammsg[i] , compiler says beammsg textview , not textview[] array. same applies beammsg2
Comments
Post a Comment