Can't get Root View from Data Binding after enabling safe-args plugin : <p>I'm working on an Android app using dataBinding and am currently trying to add the safe-args plugin, but after enabling the plugin, I can no longer get the root view via binding.root - Android Studio gives the error: </p>

<pre><code>Unresolved Reference
None of the following candidates is applicable because of a receiver type mismatch:
* internal val File.root: File defined in kotlin.io
</code></pre>

<p>How can I get databinding and safe-args to play nice together?</p>

<p>Note that while the code snippet is in Kotlin I will happily take Java answers. Not as comfortable in Java but I can easily read it and translate it.</p>

<p>I haven't been able to find anyone else with the same problem by Googling the error message and "safe args". I tried first with the classpath listed in the Android docs here: <a href="https://developer.android.com/guide/navigation/navigation-pass-data" rel="noreferrer">https://developer.android.com/guide/navigation/navigation-pass-data</a></p>

<pre><code>classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0"
</code></pre>

<p>And then also found a tutorial suggesting I use:</p>

<pre><code>classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0-alpha07"
</code></pre>

<p>Both had the same issue: binding.root gave an error with the plugin activated</p>

<p>Here is my onCreateView() for my fragment. That return line works properly when safe-args isn't enabled and doesn't work when it is enabled</p>

<pre><code>   override fun onCreateView(
    inflater: LayoutInflater, container: ViewGroup?,
    savedInstanceState: Bundle?
): View? {
    binding = DataBindingUtil.inflate(inflater, R.layout.fragment_encoder, container, false)

    return binding.root
}
</code></pre>

<p>Any help solving or understanding this problem is most appreciated!</p>
