6

Android Studio Code Completion seems not working on xml and also it doesn't recognize any xml attribute except the attrs on Android support v7 views. Screenshot:

enter image description here

my views that is from android.support.design.v7 display correctly:

enter image description here

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
morajabi
  • 147
  • 5
  • 15

2 Answers2

8

I had this issue for a while and tried all the "solutions" provided;

  • Sync Gradle files.
  • Invalidate cache.
  • Removed and re-add project.
  • Reinstall Android Studio.

Nothing worked, until I came across this answer (by 4gus71n) which has worked for me every time this rather rare, but annoying issue has presented itself: https://stackoverflow.com/a/53160674/5692877

In my case I;

  1. Closed Android Studio.
  2. Cleared the contents of the C:\Users\MyUsername\.AndroidStudio3.2\system\caches\ directory.
  3. Relaunched Android Studio.

Worked a treat!

Tom Larcher
  • 661
  • 9
  • 24
2

If you are Android Studio then go to tools and then Android then click on build with gradle, it will solve the error. I encountered it too.

Tools->Android->Build with Gradle

Pronoy999
  • 645
  • 6
  • 25