title: i want to change background after clicking Button in android with kotlin
body: <p>I want to change background after clicking Button</p>
  
  <pre><code>   var bm : Button = messeg
      bm . setOnClickListener {
          bm . background = R.color.green
      }
  </code></pre>
  
  <p>Error Log:</p>
  
  <blockquote>
    <p>Error:(35, 31) Type mismatch: inferred type is Int but Drawable! was
    expected Error:Execution failed for task ':app:compileDebugKotlin'.</p>
    
    <blockquote>
      <p>Compilation error. See log for more details</p>
    </blockquote>
  </blockquote>