5

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.

Nanda R.M
  • 119
  • 2
  • 9
  • Most of the times the problem is that Power Save Mode is enabled, to disable go to Current inspection profile (lower right corner in Android Studio).@Nanda R.M stikom – Dhanshri Feb 12 '19 at 08:13

7 Answers7

9

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.

Zahoor Saleem
  • 594
  • 5
  • 14
4

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.

Reaz Murshed
  • 22,528
  • 12
  • 75
  • 92
  • The second image was my entire project, as u can see there is no indexing process there. And yes now im trying to update my AS and nothing change. Thanks for the answer – Nanda R.M Feb 12 '19 at 08:12
  • I see, can you please try the options mentioned in the link that I have posted? – Reaz Murshed Feb 12 '19 at 08:13
  • Yes i already try that before asking. my power saving mode is not enable from beginning. and i try to enable and disable again still nothing happen T-T. – Nanda R.M Feb 12 '19 at 08:16
  • Absolutely, nothing wrong than suggestion :D. i'm not getting problem like this before and i'm not changing anything to the project. should i restart my PC ? – Nanda R.M Feb 12 '19 at 08:23
  • LOL. That's weird. You might try that as well I think. :P – Reaz Murshed Feb 12 '19 at 08:29
  • Thanks for help, and sorry i'm not active for a few days maybe :D. I fix it little different, after doing so much experiments, the last thing i do is going to delete configuration setting for Android Studio on "C:\Users\\.AndroidStudio" then all fixed. But i ll chose ur answer as accepted answer. Sorry my english bad ;v – Nanda R.M Feb 22 '19 at 00:50
4

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

Patel Vijay
  • 202
  • 2
  • 3
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.

Digital Farmer
  • 675
  • 3
  • 11
  • 37
Adnan
  • 161
  • 2
  • 4
0

First Close Android Studio. Navigate to the Installation Directory. i.e. .AndroidStudio3.3\system Delete Cache Folder . Start Android Studio. It is supposed to Work.

Karthick Ramesh
  • 1,421
  • 19
  • 27
0

With Android Studio closed go to the Path C/Users/you_user/AndroidStudio3.6\system and delete the content of caches

Eli
  • 19
  • 2
0

Go to path/.C:\Users\Hp.AndroidStudio4.0\system/ delete caches folder

and restart android studio