title: Receiver Type Mismatch with Anko Layouts
body: <p>I am trying to create layouts with Anko DSL in my support v4 Fragment but the IDE shows receiver type mismatch. DSL works ok from the v7 AppCompatActivity. In trying to get this to work I have updated to Android Studio 3.0. I have also updated the dependencies in build.gradle's as some other threads suggested. </p>
  
  <p>Here are the dependencies in my app's build.gradle</p>
  
  <pre><code>dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
  
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      compile 'com.android.support:appcompat-v7:25.4.0'
      compile 'com.android.support.constraint:constraint-layout:1.0.2'
      compile 'com.android.support:design:25.4.0'
      compile 'com.android.support:support-v4:25.4.0'
      compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
      compile "org.jetbrains.anko:anko:$anko_version"
      compile "org.jetbrains.anko:anko-appcompat-v7-commons:$anko_version"
      compile "org.jetbrains.anko:anko-appcompat-v7:$anko_version"
      compile "org.jetbrains.anko:anko-support-v4-commons:$anko_version"
      compile "org.jetbrains.anko:anko-support-v4:$anko_version"
  }
  </code></pre>
  
  <p>and the dependencies in project's build.gradle </p>
  
  <pre><code>dependencies {
      classpath 'com.android.tools.build:gradle:3.0.0'
      classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
      classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
  }
  </code></pre>
  
  <p>I have also seen this Question <a href="https://stackoverflow.com/questions/44414041/receiver-type-mismatch-with-fragment-and-anko-toast">&#39;receiver type mismatch&#39; with Fragment and Anko toast</a> </p>
  
  <p>But I am still stuck.</p>
  
  <p><a href="https://i.stack.imgur.com/J4rKq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J4rKq.png" alt="Screenshot"></a></p>