title: Ant Compile Error - NavUtils
body: <p>Ant doesn't seem to find package: <code>android.support.v4.app.NavUtils</code> </p>
  
  <p><strong>Here's the compiler errors:</strong></p>
  
  <pre><code>C:\Android\MyFirstApp\src\com\example\myfirstapp\DisplayMessageActivity.java:7: error: package  android.support.v4.app does not exist
  
  C:\Android\MyFirstApp\src\com\example\myfirstapp\DisplayMessageActivity.java:22: error: cannot find symbol: NavUtils.navigateUpFromSameTask(this);
  </code></pre>
  
  <p>I have the android directory in sdk with the class files.</p>
  
  <p><strong>MainActivity.java</strong></p>
  
  <blockquote>
  <pre><code>package com.example.myfirstapp;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.content.Intent;
  import android.view.View;
  import android.content.Intent;
  import android.widget.TextView;
  import android.widget.EditText;
  import android.view.MenuItem;
  
  public class MainActivity extends Activity {
      public final static String EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE";
      @Override
      public void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
  
          Intent intent = getIntent();
          String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
  
          TextView textView = new TextView(this);
          textView.setTextSize(40);
          textView.setText(message);
  
          setContentView(textView);
          getActionBar().setDisplayHomeAsUpEnabled(true);
      }
  public void sendMessage(View view){
      Intent intent = new Intent(this, DisplayMessageActivity.class);
      EditText editText = (EditText) findViewById(R.id.edit_message);
      String message = editText.getText().toString();
      intent.putExtra(EXTRA_MESSAGE, message);
      startActivity(intent);
  }
  }
  </code></pre>
  </blockquote>
  
  <p><strong>DisplayMessageActivity.java</strong></p>
  
  <blockquote>
  <pre><code>package com.example.myfirstapp;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.MenuItem;
  import android.view.View;
  import android.support.v4.app.NavUtils;
  
  public class DisplayMessageActivity extends Activity {
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          getActionBar().setDisplayHomeAsUpEnabled(true);
      }
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          switch (item.getItemId()) {
          case android.R.id.home:
              NavUtils.navigateUpFromSameTask(this);
              return true;
      }
  return super.onOptionsItemSelected(item);
  }
  }
  </code></pre>
  </blockquote>