Android Studio布局编辑器没有显示任何提示建议。

3
我创建了一个新的XML文件temp.xml,当我尝试在其中添加文本视图时,没有任何建议显示给我。当我点击TextView时,TextView被添加了,但没有正文。然后我从其他文件中复制粘贴了一些代码,并尝试为TextView设置大小、颜色等,但编辑器没有给出任何建议(请查看下面的图像链接)。我不知道我的布局编辑器或Android Studio是否有任何问题。(我已经尝试了“使缓存无效/重新启动”解决方案,但没有起作用)如果你们在过去遇到过这个问题,请帮帮我。非常感谢!
以下图片没有显示任何建议: enter image description here

展示错误截图并添加temp.xml代码。 - Ashish Kudale
不要添加代码或错误的截图。将其粘贴到问题中。 - Zoe stands with Ukraine
2个回答

3

这个问题有三个适当的答案。

  1. File -> Invalidate Caches / Restart... -> Select Invalidate and Restart

  2. Just navigate to your android studio installation directory, i.e

    yourDrive:/.AndroidStudio3.3/system
    

    and DELETE THE CACHE FOLDER ( first close android studio, if its running ).

    Then start Android Studio again. Done.

    P.S I am using android studio 3.3.

  3. Open the Settings or Preferences dialog: On Windows or Linux, select File > Settings from the menu bar. Navigate to Build, Execution, Deployment > Instant Run. Unchecked the box next to Restart activity on code changes.


@Robbit 很高兴能帮忙! - Parth Lotia

-1

按照以下步骤操作(这将有助于您):

1)首先,清除缓存并重新启动Android Studio。

2)然后从项目中删除.idea文件夹和所有.iml文件。

3)现在再次使用invalidate cache重新启动studio。

4)打开您的项目并构建即可。

就是这样。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接