title: How to log results to the console in android studio
body: <p>i have just made a small test case in my android studio project , see code below : </p>
  
  <pre><code>public class MainActivityTest extends ActivityInstrumentationTestCase2&lt;MainActivity&gt; {
  
      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);
      }
  }
  </code></pre>
  
  <p>now all i wanted to do was log the value of <code>textView</code> to the console , so i referred the <a href="http://developer.android.com/tools/debugging/debugging-log.html" rel="nofollow noreferrer">documentation</a> and saw that i could <code>console.log()</code> results(just like in javascript) using <code>Log.d(testView);</code> .</p>
  
  <p>but the problem is the below line in my code : </p>
  
  <p><code>Log.d(testView);</code> , causes an error , when i hover over <code>Log</code> i get the message saying "cannot resolve symbol Log" . </p>
  
  <p>so my question is how do i log results to the console in android studio .</p>
  
  <p>I refered to <strong><a href="https://stackoverflow.com/questions/16780294/how-to-print-to-the-console-in-android-studio">THIS</a></strong> question too but i'am still stuck.</p>