title: Type mismatch: inferred type is LoginActivity but LifecycleOwner was expected
body: <p>I am playing with the preview version of <code>AndroidStudio - 3.4 Canary 9</code>.</p>
  
  <p>I selected the default login activity option from <code>Configure your project</code> window and provided, selected below options:</p>
  
  <p><a href="https://i.stack.imgur.com/mYobT.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mYobT.png" alt="Configure your project"></a></p>
  
  <p>No error reported on Gradle sync, however on build compilation it produces following error:</p>
  
  <pre><code>Type mismatch: inferred type is LoginActivity but LifecycleOwner was expected
  </code></pre>
  
  <p>Here is the code snippet on which it is showing the error:</p>
  
  <pre><code>// Type mismatch at this@LoginActivity, required LifeCycleOwner, found - LoginActivity
          loginViewModel.loginFormState.observe(this@LoginActivity, Observer {
              val loginState = it ?: return@Observer
  
              // disable login button unless both username / password is valid
              login.isEnabled = loginState.isDataValid
  
              if (loginState.usernameError != null) {
                  username.error = getString(loginState.usernameError)
              }
              if (loginState.passwordError != null) {
                  password.error = getString(loginState.passwordError)
              }
          })
  </code></pre>
  
  <p><code>LoginActivity</code> is derived from <code>AppCompatActivity()</code></p>
  
  <p>Respective imported library is <code>androidx.appcompat.app.AppCompatActivity</code></p>
  
  <p>Here is content from app level build.gradle:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  apply plugin: 'kotlin-android'
  
  apply plugin: 'kotlin-android-extensions'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.example.socialsample"
          minSdkVersion 19
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
      implementation 'androidx.appcompat:appcompat:1.0.2'
      implementation 'androidx.core:core-ktx:1.1.0-alpha03'
      implementation 'com.google.android.material:material:1.0.0'
      implementation 'androidx.annotation:annotation:1.0.1'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.1.1'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  }
  </code></pre>
  
  <p>Here is content from Project level build.gradle:</p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      ext.kotlin_version = '1.3.11'
      repositories {
          google()
          jcenter()
  
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.4.0-alpha09'
          classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
  
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>Am I missing anything over here? Please suggest.</p>