so today I stared at the code when suddenly XML editor (autocomplete) stop working properly. The problem is that when I type the first letter of some element it gives me a proper suggestion but when I start typing other letters it just stuck with the first one and when I confirm the suggestion it gives me 2 words, the first one is the world I type first and the second is the correct one.
Asked
Active
Viewed 2,953 times
1
MarGin
- 1,780
- 1
- 15
- 25
Patrick kačič
- 25
- 1
- 7
-
1Invalidate cache and restart – sam Apr 16 '18 at 18:35
-
This might help. https://stackoverflow.com/questions/18370599/android-studio-auto-complete-and-other-features-not-working – S.Haviv Apr 23 '18 at 12:57
-
Do [this method](https://stackoverflow.com/a/54070040/7418129) to solve that issue. Happy coding. – ABHIMANGAL MS Nov 23 '21 at 10:06
2 Answers
5
It is very simple. Delete .caches file:
For Android Studio 4+
- Just close your AS.
- Go to AndroidStudio2020.3 folder.
- Delete the Caches file (path is: C:\Users\user\AppData\Local\Google\AndroidStudio2020.3\caches)
- Restart your AS.
- Enjoy.
For Android Studio 3+
if you are using Android Studio 3+ then delete cache from the following path
C:\Users\user\AndroidStudio3.x\system\caches
ABHIMANGAL MS
- 974
- 12
- 17
-
1thanks a lot I didn't know the path (C:\Users\user\AppData\Local\Google\AndroidStudio2020.3\caches) you saved my day – mozhi jafr Dec 09 '21 at 13:03
1
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 works for me.
tarun_sharma
- 119
- 1
- 5