无论我尝试什么,我似乎都无法克服这个错误 - 我已经尝试删除 int 值(我似乎应该这样做),但这只会导致更多的编译器错误。
有什么建议么?
void processIntent(Intent intent) {
Parcelable[] rawMsgs = intent.getParcelableArrayExtra(
NfcAdapter.EXTRA_NDEF_MESSAGES);
// only one message sent during the beam
NdefMessage[] msg = new NdefMessage[rawMsgs.length];
for (int i = 0; i < msg.length; i++) {
msg[i] = (NdefMessage) rawMsgs[i];
// record 0 contains the MIME type, record 1 is the AAR, if present
beamMsg.setText(new String(msg.getRecords(1).getPayload()));
beamMsg2.setText(new String(msg.getRecords(1).getPayload()));
}}