Kotlin-android: unresolved reference databinding

后端 未结 16 1024
借酒劲吻你
借酒劲吻你 2020-12-02 16:23

I have following fragment class written in Java using the new databinding library

import com.example.app.databinding.FragmentDataBdinding;

public class Data         


        
16条回答
  •  -上瘾入骨i
    2020-12-02 17:00

    In my case, adding

    kapt {
        generateStubs = true
    }
    

    Solved the problem for me. I ignored it the first time, I thought it's irrelevant to the problem:

    Unresolved reference databinding

    But now, data-binding is working just fine.

提交回复
热议问题