title: how to do junit testing in android
body: <p>i am new to android and i want to do a junit testing in android then i followed this code <a href="http://developer.android.com/resources/tutorials/testing/helloandroid_test.html" rel="nofollow">from android site</a></p>
  
  <p>i am getting many errors 
  as <strong>HelloAndroid cannot be resolved to a type</strong></p>
  
  <p><strong>Multiple markers at this line
      - HelloAndroid cannot be resolved to a type
      - The constructor ActivityInstrumentationTestCase2(Class) refers to the missing type 
       HelloAndroid</strong></p>
  
  <p><strong>Multiple markers at this line
      - The method getActivity() from the type ActivityInstrumentationTestCase2 refers to the missing type 
       HelloAndroid
      - HelloAndroid cannot be resolved to a type</strong></p>
  
  <p><strong>Multiple markers at this line
      - HelloAndroid cannot be resolved to a type
      - com.example.helloandroid.R cannot be resolved to a 
       variable</strong></p>
  
  <pre><code> package  com.example.helloandroid.test;
  
  import android.test.ActivityInstrumentationTestCase2;
  import android.widget.TextView;
  
  public class HelloAndroidTest extends ActivityInstrumentationTestCase2&lt;HelloAndroid&gt; {
      private HelloAndroid mActivity;  // the activity under test
      private TextView mView;          // the activity's TextView (the only view)
      private String resourceString;
  
      public HelloAndroidTest() {
        super("com.example.helloandroid", HelloAndroid.class);
      }
      @Override
      protected void setUp() throws Exception {
          super.setUp();
          mActivity = this.getActivity();
          mView = (TextView) mActivity.findViewById(com.example.helloandroid.R.id.textview);
          resourceString = mActivity.getString(com.example.helloandroid.R.string.hello);
      }
      public void testPreconditions() {
        assertNotNull(mView);
      }
      public void testText() {
        assertEquals(resourceString,(String)mView.getText());
      }
  }
  </code></pre>
  
  <p>can anyone help me</p>