title: how can I show log on onclick of a button in android?
body: <p>Trying to add just <code>onClick</code> function run in the android studio. I want to show text message in log by clicking on my button but the desired result doesn't come.</p>
  
  <p>Please help.</p>
  
  <p>activity_main.xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:onClick="clickFunction"
  tools:context=".MainActivity"&gt;
  
  
  &lt;Button
      android:id="@+id/button"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="139dp"
      android:text="Button" /&gt;
     &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>mainActivity.java file</p>
  
  <pre><code> package com.example.jewelcsebu.hellotest;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.View;
  
  public class MainActivity extends AppCompatActivity {
  
  public void clickFunction(View view){
  
       Log.i("Info", "Button Pressed");
  
  }
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
   }
  }
  </code></pre>
  
  <p>I just made <code>onClick</code> function to run. but this given error below:</p>
  
  <pre><code>2018-12-06 19:40:12.700 1808-1808/? E/netmgr: Failed to open QEMU pipe 'qemud:network': Invalid argument
  2018-12-06 19:40:19.252 1716-1745/? E/storaged: getDiskStats failed with result NOT_SUPPORTED and size 0
  2018-12-06 19:40:37.061 1890-1911/system_process E/memtrack: Couldn't load memtrack module
  </code></pre>