I'm new to Java and I am trying to follow the examples on developer.android.com. I'm interested in learning how to test applications. The specific problem I have is that I can't get the test files to run properly. For example, I go to developer.android.com -> Develop -> Samples -> Testing and download the ActivityInstrumentation files. I import them into Eclipse. I get 2 projects (MainActivity and tests). I right-click on "tests" and choose Properties. Under Project References, I check off "MainActivity" (my co-worker told me I should do this to link the projects).
The SampleTests.java file has red squiggly lines under the following:
import com.example.android.activityinstrumentation.MainActivity;
import com.example.android.activityinstrumentation.R;
I, and my co-worker can't figure out what is wrong. I'd really like to run these files.
(If it helps, I am able to get the MainActivity part onto my phone, and I've been playing with clicking all the buttons and other fun things that it demonstrates.)
Thanks in advance for your help.