Android Studio fails to generate databinding after 3.1.0 update

前端 未结 20 2964
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-15 02:40

This morning I made an update to android studio from 3.0.1 to 3.1.0. After updating the gradle to latest version I still get build error regarding

20条回答
  •  一个人的身影
    2020-12-15 03:37

    I got this while updating gradle to 3.4.2. All you need to do is remove the import statement of java.lang.

    Caution: Android Studio doesn't yet handle imports so the autocomplete for imported variables may not work in your IDE. Your app still compiles and you can work around the IDE issue by using fully qualified names in your variable definitions.

    Source: https://developer.android.com/topic/libraries/data-binding/expressions#import-classes

提交回复
热议问题