title: unresolved reference: text - Android Studio + Kotlin (findViewById fault?)
body: <p>I am trying to create an alert dialog although I have a very strange problem. My .text is giving me the error "unresolved reference". I triple and quadra checked but cant really find the reason.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>fun addChannelClicked(view: View) {
      if (AuthService.isLoggedIn) {
          val builder = AlertDialog.Builder(this)
          val dialogView = layoutInflater.inflate(R.layout.add_channel_dialog, null)
  
          builder.setView(dialogView)
                  .setPositiveButton("Add") { dialogInterface, i  -&gt;
                      // perform some logic when clicked
                      val nameTextField = dialogView.findViewById&lt;EditText&gt;(R.id.addChannelNameTxt)
                      val descTextField = dialogView.findViewById&lt;EditText&gt;(R.id.addChannelDescTxt)
                      val channelName = nameTextField.text.toString()
                      val channelDesc = descTextField.text.toString()
  
                      // Create channel with the channel name and description
                      hideKeyboard()
  
                  }
                  .setNegativeButton("Cancel") { dialogInterface, i -&gt;
                      // Cancel and close the dialog
                      hideKeyboard()
                  }
                  .show()
      }
  }
  </code></pre>