【问题标题】:Android studio is not creating the views ids immediately after declaring it声明后,Android Studio 不会立即创建视图 ID
【发布时间】:2018-05-24 21:11:54
【问题描述】:

在更新我的 android studio 之前,它运行良好。更新后我遇到了问题。当我在布局中声明任何视图的 id 时使用数据绑定工具,在我重建项目之前,android studio 不会在 java 文件中显示该 id 的任何建议。但是以前版本的 android studio 它会立即显示 id 建议,而无需制作、清理或重建项目。我的 android studio 的当前版本是 3.1.2。知道如何解决这个问题吗?

【问题讨论】:

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


    【解决方案1】:

    尝试使缓存无效。

    希望这能解决问题。

    【讨论】:

    • 我每天这样做超过 100 次。
    【解决方案2】:

    试试这个对我有用:

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

    另一个解决方案是这样的:

    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.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-09-13
      • 2014-03-11
      • 2012-10-06
      • 1970-01-01
      • 2020-07-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多