title: Android ViewBinding error in the inflate-method - missing or conflicting dependencies
body: <p>After removing the existing <code>DataBinding</code> from the project, I also wanted to get rid of the <code>kotlinx.android.synthetic</code> and replace it with <code>ViewBinding</code>.</p>
  <p>However, after enabling <code>ViewBinding</code> in my project, I'm still not able to do a proper setup.</p>
  <p>Trying to invoke the <code>ViewBinding</code> into my <code>MainActivity</code> or in one of my fragments I get the following error in the <code>inflate</code> method:</p>
  <pre><code>Cannot access 'no_name_in_PSI_...' which is a supertype of 'com.example.projectname.databinding.ActivityMainBinding'. Check your module classpath for missing or conflicting dependencies
  </code></pre>
  <p>For example:</p>
  <p><strong>MainActivity.kt</strong></p>
  <pre><code>class MainActivity : BaseActivity&lt;SharedViewModel&gt;() {
        private lateinit var binding: ActivityMainBinding
        ...
        override fun onCreate(savedInstanceState: Bundle?) {
          setTheme(R.style.AppTheme)
          super.onCreate(savedInstanceState)
          binding = ActivityMainBinding.inflate(layoutInflater)
          setContentView(binding.root)
        }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ehksl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ehksl.png" alt="enter image description here" /></a></p>
  <p>My <code>build.gradle (:app)</code> is properly set up:</p>
  <p><strong>build.gradle (:app)</strong></p>
  <pre><code>android {
    ...
    buildFeatures {
          viewBinding true
      }
  }
  </code></pre>
  <p>I've used <code>ViewBinding</code> in another project of mine and it worked out of the box. Please help. Thank you so much.</p>