Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "No Suggestion" on ctrl+space on xml file android studio?

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.

enter image description here

I just want to show suggestion like before normally.

enter image description here [EDIT]

And every time i select TextView or EditText the element not making layout_width and height automatically.

enter image description here

How I Solved It!

Everybody maybe had a different way of solving this problem. But for me after doing so many experiments, the last thing I do is going to delete configuration setting for Android Studio on "C:\Users\.AndroidStudio" then all fixed for me.

like image 521
Nanda R.M Avatar asked Feb 12 '19 08:02

Nanda R.M


5 Answers

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.

like image 52
Zahoor Saleem Avatar answered Oct 22 '22 20:10

Zahoor Saleem


Have the same issue, delete caches, invalidate caches or disable power mode is not work for me

I change compileSdk from 33 to 30

and it's work

I use Android studio chipmunk | 2021.2.1 Patch 1

Maybe new feature still not work properly or something. If anyone can explain this will be very helpfull

like image 10
Sasmita Novitasari Avatar answered Oct 22 '22 19:10

Sasmita Novitasari


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.

like image 4
Reaz Murshed Avatar answered Oct 22 '22 19:10

Reaz Murshed


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

like image 4
Patel Vijay Avatar answered Oct 22 '22 20:10

Patel Vijay


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.

like image 4
Adnan Avatar answered Oct 22 '22 20:10

Adnan