问题
I can't get any suggestion from my xml layout file. What must I do to fix the problem?
I have tried to invalidate/restart Android studio, enable and disable, deleting build folder, .idea folder, .iml file, and I have tried to make a new project but the suggestion still not show up.
I just want to show suggestion like before normally.
[EDIT]
And every time i select TextView or EditText the element not making layout_width and height automatically.
回答1:
Normally, you will not get suggestions until your project is rightly indexed. So before the indexing is complete, you will see this problem. Once the indexing of files is complete, you should be able to see the suggestions.
However, if the indexing is complete and you still do not get the suggestion, I would like to recommend to install the latest version of Android Studio again and do not import any settings from your previous version.
You can also try looking for if the Power Saving Mode and invalidating the cache. This post addresses the same issue I think where you might have a look as well.
回答2:
I have tried different things(deleting .idea folder and .iml files from the project, invalidate cache and restart the Android Studio) nothing worked.
Finally I close the Android Studio and navigate to android studio installation directory(i.e C:\Users\Your Username\.AndroidStudio3.3\system) delete the Cache folder, run the android studio and it's works for me.
回答3:
first solution
deleting .idea folder and all .iml files from the project, restarting Android Studio and rebuilding gradle did the trick. Autocomplete in XML support library is working again.
Second Solution
Just navigate to your android studio installation directory, i.e,
your drive path:/.AndroidStudio3.4/system
inside system folder.. DELETE CATCH FOLDER
回答4:
1- close the android studio entirely.
2- Open File explorer
and go to:C:\Users\Username\.AndroidStudio3.5\system
.
3- Now delete the Caches folder
.
4- Run the android studio.
5- After indexing it will work.
来源:https://stackoverflow.com/questions/54645330/how-to-fix-no-suggestion-on-ctrlspace-on-xml-file-android-studio