title: Cannot be resolved to a type errors when following Android NFC Tutorial / Example
body: <p>I'm attempting to use the following example source code to add NFC functionality to my app:</p>
  
  <p><a href="http://gitorious.org/0xdroid/development/blobs/150dd1693ff06a7683076eebe669277631dedf06/samples/NFCDemo/src/com/example/android/nfc/TagViewer.java" rel="nofollow">http://gitorious.org/0xdroid/development/blobs/150dd1693ff06a7683076eebe669277631dedf06/samples/NFCDemo/src/com/example/android/nfc/TagViewer.java</a></p>
  
  <p>However when I do so I'm getting several "cannot be resolved to a type" errors.</p>
  
  <p>...anyone have any suggestions?</p>
  
  <p>P.S.</p>
  
  <p>I have a feeling it stems from the line: <code>import com.nfc.linked.record.ParsedNdefRecord;</code></p>
  
  <p>but I'm not sure how to fix the issue.</p>
  
  <p>ERRORS:</p>
  
  <pre><code>ParsedNdefRecord cannot be resolved to a type       line 97 Java Problem
  title_scanned_tag cannot be resolved or is not a field      line 77 Java Problem
  ParsedNdefRecord cannot be resolved to a type       line 100    Java Problem
  NdefMessageParser cannot be resolved        line 97 Java Problem
  The import com.nfc.linked.record cannot be resolved     line 30 Java Problem
  title cannot be resolved or is not a field      line 51 Java Problem
  list cannot be resolved or is not a field       line 50 Java Problem
  </code></pre>
  
  <p>SOURCE:</p>
  
  <pre><code>import android.app.Activity;
  import android.app.PendingIntent;
  import android.content.Context;
  import android.content.DialogInterface;
  import android.os.Bundle;
  import android.view.MenuInflater;
  import android.view.MenuItem;
  import android.view.View;
  import android.view.Menu;
  import android.graphics.BitmapFactory;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.content.Intent;
  import android.app.PendingIntent;
  import android.app.Notification;
  import android.app.NotificationManager;
  import android.nfc.NdefMessage;
  import android.nfc.NdefRecord;
  import android.nfc.NfcAdapter;
  import android.os.Bundle;
  import android.os.Parcelable;
  import android.util.Log;
  import android.view.LayoutInflater;
  import android.view.WindowManager;
  import android.widget.LinearLayout;
  import android.widget.TextView;
  import com.nfc.linked.record.ParsedNdefRecord;
  import java.util.List;
  
  
  public class AppActivity extends Activity implements OnClickListener  {
  
      static final String TAG = "ViewTag";
      static final int ACTIVITY_TIMEOUT_MS = 1 * 1000;
      private TextView mTitle;
      private LinearLayout mTagContent;   
          private Button b;
  
  
  
  
  
  
          @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      mTagContent = (LinearLayout) findViewById(R.id.list);
      mTitle = (TextView) findViewById(R.id.title);
      resolveIntent(getIntent());
      b=(Button)findViewById(R.id.button1);
      b.setOnClickListener(this);
  
  
  }
  
          void resolveIntent(Intent intent) {
              String action = intent.getAction();
                  if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(action)) {
                      Parcelable[] rawMsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);
                                  NdefMessage[] msgs;
                                  if (rawMsgs != null) {
                                      msgs = new NdefMessage[rawMsgs.length];
                                      for (int i = 0; i &lt; rawMsgs.length; i++) {
                                          msgs[i] = (NdefMessage) rawMsgs[i];
                                      }
                                  } else {
                                      // Unknown tag type
                                      byte[] empty = new byte[] {};
                                      NdefRecord record = new NdefRecord(NdefRecord.TNF_UNKNOWN, empty, empty, empty);
                                      NdefMessage msg = new NdefMessage(new NdefRecord[] {record});
                                      msgs = new NdefMessage[] {msg};
                                  }
  
                                  setTitle(R.string.title_scanned_tag);
                                              buildTagViews(msgs);
                                          } else {
                                              Log.e(TAG, "Unknown intent " + intent);
                                              finish();
                                              return;
                                          }
                                      }
  
          void buildTagViews(NdefMessage[] msgs) {
                      if (msgs == null || msgs.length == 0) {
                          return;
                      }
                      LayoutInflater inflater = LayoutInflater.from(this);
                      LinearLayout content = mTagContent;
                      // Clear out any old views in the content area, for example if you scan
                      // two tags in a row.
                      content.removeAllViews();
                      // Parse the first message in the list
                      // Build views for all of the sub records
                      List&lt;ParsedNdefRecord&gt; records = NdefMessageParser.parse(msgs[0]);
                      final int size = records.size();
                      for (int i = 0; i &lt; size; i++) {
                          ParsedNdefRecord record = records.get(i);
                          content.addView(record.getView(this, inflater, content, i));
                          inflater.inflate(R.layout.main, content, true);
                      }
                  }
          @Override
              public void onNewIntent(Intent intent) {
                  setIntent(intent);
                  resolveIntent(intent);
              }
              @Override
              public void setTitle(CharSequence title) {
                  mTitle.setText(title);
              }
  
  
  
  
  @Override
  public void onClick(View v) {
      Intent intent = new Intent();
      PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, 0);
      Notification noti = new Notification.Builder(this)
      .setTicker("Link Access Granted!")
      .setContentTitle("Linking Manager")
      .setContentText("Link Access Granted!")
      .setSmallIcon(R.drawable.ic_stat_notify_template3)
      .setContentIntent(pIntent).getNotification();
      noti.flags=Notification.FLAG_AUTO_CANCEL;
      NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
      notificationManager.notify(0, noti);
      Intent startMain = new Intent(Intent.ACTION_MAIN);
      startMain.addCategory(Intent.CATEGORY_HOME);
      startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      startActivity(startMain);
  
  }
  
  }
  </code></pre>