title: Kotlin compiler error: expecting member declaration
body: <p>I'm new to <em>Android Studio</em> and <em>Java</em>. Trying to write a log in. Can someone help me understand what's going on with the code?</p>
  
  <pre><code>package com.example.XXX.myapplication
  
  import android.support.v7.app.AppCompatActivity
  import android.os.Bundle
  import android.widget.TextView;
  import android.widget.Button;
  import android. widget.EditText;
  import android.widget.Toast;
  
  import kotlinx.android.synthetic.main.activity_calendar.*
  
  class Calendar : AppCompatActivity() {
      Button b1,b2; // Log in page** - b1 = log in; b2 - sign up;
      TextView tx1, tx2,tx3; // tx1 = username; tx2 = password;
      EditText ed1, ed2; // ed1 = username; ed2 = password inputs;
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_calendar)
  
          // Example of a call to a native method
          b1 = (Button)findViewById(R.id.bt1LogIn);
          b2 = (Button)findViewById(R.id.bt2SignUp);
          ed1 = (EditText)findViewById(R.id.etUserName);
          ed2 = (EditText)findViewById(R.id.etPassword);
          tx1 = (TextView)findViewById(R.id.tvUserName);
          tx2 = (TextView)findViewById(R.id.tvPassword);
          tx3 = (TextView)findViewById(R.id.tvattempts);
  }
  </code></pre>