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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -