title: Android Run time exception
body: <p>I have a main activity and another activity. when i click send button the app stops. The log shows run time exception. Here is my code, pls help fix this. I have just started to learn building android apps.</p>
  
  <pre><code>     &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.dinesh.mdk"&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:roundIcon="@mipmap/ic_launcher_round"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity android:name=".MainActivity"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity android:name=".DisplayMessageActivity"
              android:parentActivityName=".MainActivity"&gt;
              &lt;!-- The meta-data tag is required if you support API level 15 and lower --&gt;
              &lt;meta-data
                  android:name="android.support.PARENT_ACTIVITY"
                  android:value=".MainActivity" /&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>This is for main activity</p>
  
  <pre><code>package com.example.dinesh.mdk
  
  import android.support.v7.app.AppCompatActivity
  import android.os.Bundle
  import android.view.View
  import android.content.Intent
  import android.widget.EditText
  
  
  const val EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE"
  
  class MainActivity : AppCompatActivity() {
  
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_main)
      }
  
      fun sendMessage(view: View) {
          val editText = findViewById&lt;EditText&gt;(R.id.editText3)
          val message = editText.text.toString()
          val intent = Intent(this, DisplayMessageActivity::class.java).apply {
              putExtra(EXTRA_MESSAGE, message)
          }
          startActivity(intent)
  
      }
  
  }
  </code></pre>
  
  <p>This is the code for display message activity.</p>
  
  <pre><code>package com.example.dinesh.mdk
  
  import android.support.v7.app.AppCompatActivity
  import android.os.Bundle
  import android.widget.TextView
  import android.content.Intent
  
  
  
  class DisplayMessageActivity : AppCompatActivity() {
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_display_message)
  
      }
      // Get the Intent that started this activity and extract the string
      val message = intent.getStringExtra(EXTRA_MESSAGE)
  
  
      // Capture the layout's TextView and set the string as its text
      val textView = findViewById&lt;TextView&gt;(R.id.textView).apply {
          text = message
      }
  
  }
  </code></pre>
  
  <p>I could not figure out what the issue is. Here is my logcat. I am using Ubuntu</p>
  
  <pre><code>10-20 19:53:00.634 2526-2526/android.process.media E/libprocessgroup: failed to make and chown /acct/uid_10005: Read-only file system
  10-20 19:53:00.634 2526-2526/android.process.media W/Zygote: createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?
  10-20 19:53:03.941 2526-2714/android.process.media E/SQLiteLog: (283) recovered 60 frames from WAL file /data/user/0/com.android.providers.media/databases/internal.db-wal
  10-20 19:53:04.352 2526-2714/android.process.media W/MediaScanner: Error opening directory '/oem/media/', skipping: No such file or directory.
  10-20 19:53:04.395 2526-2714/android.process.media W/MediaProvider: no database for scanned volume external
  10-20 19:53:04.613 2526-2714/android.process.media E/SQLiteLog: (283) recovered 30 frames from WAL file /data/user/0/com.android.providers.media/databases/external.db-wal
  10-20 19:53:04.746 2526-2714/android.process.media D/MediaProvider: object removed 10
  10-20 19:53:04.747 2526-2714/android.process.media D/MediaProvider: object removed 20
      object removed 21
      object removed 22
      object removed 23
      object removed 24
      object removed 25
      object removed 26
      object removed 27
  10-20 19:53:05.221 2526-2714/android.process.media V/MediaScanner: pruneDeadThumbnailFiles... android.database.sqlite.SQLiteCursor@315e15bc
  10-20 19:53:05.222 2526-2714/android.process.media V/MediaScanner: /pruneDeadThumbnailFiles... android.database.sqlite.SQLiteCursor@315e15bc
  10-20 19:53:11.137 2526-2932/android.process.media D/DownloadManager: [5] Starting
  10-20 19:53:11.417 2526-2932/android.process.media W/ActivityThread: ClassLoader.loadClass: The class loader returned by Thread.getContextClassLoader() may fail for processes that host multiple applications. You should explicitly specify a context class loader. For example: Thread.setContextClassLoader(getClass().getClassLoader());
  10-20 19:53:14.595 2526-2932/android.process.media D/DownloadManager: [5] Finished with status SUCCESS
  10-20 19:53:16.139 2526-3062/android.process.media D/DownloadManager: [6] Starting
  10-20 19:53:16.488 2526-3062/android.process.media D/DownloadManager: [6] Finished with status SUCCESS
  </code></pre>