i have just made a small test case in my android studio project , see code below :
public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActivity> {
MainActivity activity;
public MainActivityTest() {
super(MainActivity.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
activity = getActivity();
}
public void testMainActivity() {
TextView textView = (TextView) activity.findViewById(R.id.hello_world);
Log.d(textView);
assertNotNull(textView);
}
}
now all i wanted to do was log the value of textView
to the console , so i referred the documentation and saw that i could console.log()
results(just like in javascript) using Log.d(testView);
.
but the problem is the below line in my code :
Log.d(testView);
, causes an error , when i hover over Log
i get the message saying "cannot resolve symbol Log" .
so my question is how do i log results to the console in android studio .
I refered to THIS question too but i'am still stuck.