title: The app stops working when any button is clicked, Error says that it couldn't find method
body: <p>I am learning Kotlin and recently have jumped upon a certain problem. As soon as I click on any button in my app, I get a similar error as shown in the title. Here's the complete error code</p>
  
  <pre><code>  java.lang.IllegalStateException: Could not find method buRequestEvent(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatButton with id 'buRequest'
      at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.resolveMethod(AppCompatViewInflater.java:423)
      at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:380)
      at android.view.View.performClick(View.java:5646)
      at android.view.View$PerformClick.run(View.java:22473)
      at android.os.Handler.handleCallback(Handler.java:761)
      at android.os.Handler.dispatchMessage(Handler.java:98)
      at android.os.Looper.loop(Looper.java:156)
      at android.app.ActivityThread.main(ActivityThread.java:6523)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
  </code></pre>
  
  <p>I have tried a lot of fixes given on other questions but most of them are in Java and I am programming in Kotlin. None of them have worked yet.</p>
  
  <p>Here's the code of one of the buttons</p>
  
  <p>from <em>MainActivity.kt</em></p>
  
  <pre><code> protected fun buRequestEvent(view: View){
          var userEmail = etEmail.text.toString()
          myRef.child("Users").child(splitString(userEmail)).child("Request").push().setValue(myEmail)
      }
  </code></pre>
  
  <p>I have a rough idea that the problem might be due to the imports in my project file so here's the list of the imports</p>
  
  <p>from <em>MainActivity.kt</em></p>
  
  <pre><code>import android.support.v7.app.AppCompatActivity
  import android.os.Bundle
  import android.view.View
  import android.widget.Button
  import android.widget.Toast
  import com.google.firebase.analytics.FirebaseAnalytics
  import com.google.firebase.auth.FirebaseAuth
  import com.google.firebase.database.DataSnapshot
  import com.google.firebase.database.DatabaseError
  import com.google.firebase.database.FirebaseDatabase
  import com.google.firebase.database.ValueEventListener
  import kotlinx.android.synthetic.main.activity_main.*
  import java.util.*
  import kotlin.collections.HashMap
  </code></pre>
  
  <p>P.S. - I have checked the XML file, the button has an onClick attribute added to it</p>
  
  <p>from <em>activity_main.xml</em></p>
  
  <pre><code>&lt;Button
              android:id="@+id/buRequest"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:onClick="buRequestEvent"
              android:text="REQUEST" /&gt;
  </code></pre>