声明后,Android工作室不会立即创建视图ID

时间:2018-05-24 21:11:55

标签: android android-layout android-studio android-databinding

在更新我的android工作室之前它运行得很好。更新后,我遇到了问题。当我在布局中声明任何视图的id时使用数据绑定工具,android studio在重建项目之前没有在java文件中显示该id的任何建议。但是之前版本的android studio它立即显示了id建议,没有make,clean或rebuild项目。我的android studio的当前版本是3.1.2。知道怎么解决这个问题吗?

2 个答案:

答案 0 :(得分:0)

尝试使缓存无效。 enter image description here

希望这可以解决问题。

答案 1 :(得分:0)

试试这个对我有用:

您还可以检查“文件”菜单上的“省电模式”是否已禁用。

另一种解决方案是:

Project Settings [name]
Inspections - ensure that Android and Android Lint is checked, or alternatively just set it back to default using the dropdown box at the top.

IDE Settings
Editor -> Code Completion - ensure the Autopopup code completion is checked (and check the rest of the settings based on your preference.