Android Studio layout editor does not show any suggestions

只谈情不闲聊 提交于 2019-12-02 05:55:16

问题


I created new XML file temp.xml, when I tried to add text view in it, no suggestions are shown to me. When I clicked on TextView, TextView gets added with no body. Then I copy paste some code from other file and tried to give size, color etc to TextView editor is not giving me any suggestions(check image link below) I don't know is there any problem with my layout editor or with Android Studio. (I already tried Invalidate cache / Restart solution, not worked ) If you guys faced this problem in past plz help me. Thank You in advance. This below image doesn't show any suggestions


回答1:


There are three suitable answers for this question .

  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.




回答2:


Follow the below steps (this will help you):

1) First of all, Invalidate cache and restart android studio.

2) Then delete .idea folder and all .iml files from the project.

3) Now restart studio again with invalidate cache.

4) Open your project and build.

That's it.



来源:https://stackoverflow.com/questions/54899093/android-studio-layout-editor-does-not-show-any-suggestions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!