问题
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 .
File -> Invalidate Caches / Restart... -> Select Invalidate and Restart
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.
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