Android Studio - Auto complete and other features not working

Android Studio

Android Studio Problem Overview


I installed android studio.. it was working fine. Now all the sudden, none of the auto complete features are working.. I can type anything anywhere no variable checking, no help with functions or checking anything. I can still compile the project and I get errors when that happens.

Can anyone please help me out with this issue.

Android Studio Solutions


Solution 1 - Android Studio

Go File > Invalidate Caches / Restart... > Click at Invalidate an Restart

enter image description here

enter image description here

This really works for me.

Source: https://code.google.com/p/android/issues/detail?id=61844#c4

Solution 2 - Android Studio

You can also check if Power Save Mode on File menu is disabled.

Solution 3 - Android Studio

Close Android Studio Go to C:\Users\UserName.android and rename the folder:

  • build-cache to build-cache_old

Go to C:\Users\UserName.AndroidStudio3.x\system OR (Android studio 4 and Higher) Go to C:\Users\UserName\AppData\Local\Google\AndroidStudio4.x and rename these folders:

  • caches to caches_old

  • compiler to compiler_old

  • compile-server to compile-server_old

  • conversion to conversion_old

  • external_build_system to external_build_system_old

  • frameworks to frameworks_old

  • gradle to gradle_old

  • resource_folder_cache to resource_folder_cache_old

Open the Android Studio and open your project again.

Solution 4 - Android Studio

  1. Close Android Studio

  2. Go to c_users_path_on_windows/.AndroidStudio3.5/system/

  3. Delete the cache folder

  4. Start Android Studio

    This works for me.

Solution 5 - Android Studio

Most of the times i have seen that the problem is that Power Save Mode is enabled, to disable go to Current inspection profile (lower right corner in Android Studio).

enter image description here

Solution 6 - Android Studio

I have not run into this problem personally, but try checking the following settings (File -> Settings or Alt+F7):

Project Settings [name]
Inspections - ensure that Android and Android Lint is checked, or alternately just set it back to default using the dropdown box at the top.

IDE Settings
Editor -> Code Completion - ensure the Autopopup code completion is checked (and check the rest of the settings based on your preference.

Solution 7 - Android Studio

Uncheck "Power Save Mode" in "File" tab

enter image description here

Solution 8 - Android Studio

Solution: Try disabling "File -> Power Save Mode" in Android Studio (Beta) 0.8.14 - Mac OS X

On windows, the option can be at some other place.


I had the same problem then I recalled that while exploring the new android studio, I switched on the "File -> Power Save Mode" to see what it does?

I disabled the power save mode and all those intelligent features were back.

It turned out that in Power Save Mode, Android Studio switches off the modules responsible for features like Smart Code Completion and Code Analysis.

Solution 9 - Android Studio

I had a similar problem where none of the other solutions worked.

Closing Android Studio and then deleting the .idea and build folders resolved the issue.

Solution 10 - Android Studio

If nothing works (like happened with me ) go to your user profile in windows at %userprofile% . You will find folders there (hidden) named with the version of the android studio you are using and prefixed with a dot.

like .AndroidStudio3.1. Just delete that .

Solution 11 - Android Studio

Disable Power Save Mode and Invalidate Cache and Restart.

enter image description here

Solution 12 - Android Studio

For Artic Fox 2020|3.1 Version: Auto Complete Suggestion Problem.

Please Follow the Following Steps:

Close Android Studio

Locate caches folder in C:\Users{username}\AppData\Local\Google\AndroidStudio2020.3 and Delete it. Open Android Studio Again.

Check your Android studio version and Target that version folder at below location C:\Users{username}\AppData\Local\Google

Note : AppData folder is Hidden in Windows

This Solution also works if android studio mess up with xml files and java code. Don't! modify your code otherwise IDE won't able to change it to default. If you see such messy code just follow above steps and your code will be fine again.

Solution 13 - Android Studio

It's Working

Disable Power Save Mode

Untick Power Save Mode Option :: File -> Power Save Mode

Solution 14 - Android Studio

Just remove all the folders named AndroidStudioPreview

On Windows:

Go to your User Folder - on Windows 7/8 this would be:

[SYSDRIVE]:\Users[your username] (ex. C:\Users\JohnDoe)

In this folder there should be a folder called .AndroidStudioPreview

On Mac OS X

Remove these files:

~/Library/Application Support/AndroidStudioPreview ~/Library/Caches/AndroidStudioPreview ~/Library/Logs/AndroidStudioPreview ~/Library/Preferences/AndroidStudioPreview

Solution 15 - Android Studio

There is a power saver mode in android studio if accidentally you click on that it will disable code analysis which will reduce the battery consumption and performance will also increase but it will not detect any errors and do auto complete operations.

To disable power saver mode

- Go to File Menu of Studio
- Uncheck The Power Saver Mode

In your IDE code analysis will be shown using an eye symbol at the right corner of your android studio.

If Green means it is enabled and there is no error in your code.
If Red Means It is enabled but there are few errors in your code.
If It is white or blur then code analysis is disabled

Solution 16 - Android Studio

Be sure to check for IDE errors by clicking the button at the bottom right of android studio.

enter image description here

In my case, there was a bad plugin, and the IDE Fatal Errors window prompted me to uninstall the plugin. (I wish I'd known about this feature before spending half a day invalidating caches, deleting folders, and reinstalling android studio with no luck.)

Solution 17 - Android Studio

In my case, when I switch keyboard language to English, the auto complete works again.

Solution 18 - Android Studio

i have this problem many times until now ,i suggest thees approach :

1-as said check power saveing mode

2-create new project with same application id and package name and copy all source and resource from older project to new one,

Solution 19 - Android Studio

If you have a library project included, make sure the library has the dependencies in build.gradle listed using the api configuration, not the implementation configuration. Also make sure that the project that includes the library has all the dependencies listed (using the implementation configuration is fine here).

Solution 20 - Android Studio

'The file size (2561270 bytes) exceeds configured limit (2560000 bytes). Code insight features are not available.' 

Had this issue for days with none of these proposed solutions working before eventually getting this message in yellow under the tabs after adding a line of code. Removing the line of code eliminated the message but not the issue. There appears to be a code size window where you lose insight features but don't get this message, at least for me. Once you go over a certain point the message finally pops up. The suggested solution in a different thread for this issue was to edit 'Help/Edit Custom Properties' to increase the configured limit, but just opening this brought up a dialogue asking if I wanted to create an 'idea.properties' folder so I decided not to risk that approach over eventually cutting the file size.

Solution 21 - Android Studio

There can be several things which cause this.

  1. Make sure you've write the correct version in targetSdkVersion and compileSdkVersion.
  2. Make sure targetSdkVersion and compileSdkVersion are same.

Other solutions can be:

  1. Invalidate caches & restart Android Studio from FileInvalidate Caches / Restarts...
  2. Clean your project from BuildClean Project
  3. Rebuild project from BuildRebuild Project
  4. Make project from BuildMake Project [this process may take some time]

Solution 22 - Android Studio

if the autocomplete isn't working for you in Android Studio, just press File and uncheck the Power save mode, it should work fine after that. if power save mode is already unchecked then first check then uncheck them.

Solution 23 - Android Studio

In my case, C:\Users\UserName\AppData\Local\Google\AndroidStudio2020.3\ just delete caches folder and restart android studio. after deleting this caches folder my problem was solved :)

Solution 24 - Android Studio

Simpy It was working for me after restarting the Android studio.

Solution 25 - Android Studio

I encounter with this problem while adding a kotlin library into my project on mac. Changing macbook language to english solved this problem. I also had some weird problems with auto-generated databinding codes, those are also solved.

Solution 26 - Android Studio

From menu select: File->Invalidate Catches/Restart...

than in opened dialog select: "Invalidate and Restart" and wait to restart android studio.

Solution 27 - Android Studio

If sometimes this problem can occur if you misspelled a file extension or make a file without adding an extension. Check you have added the file extension correctly.

I think that answer may help you.

Solution 28 - Android Studio

I'm using mac and suddenly the code completion (^space) not working. There are no errors. Turned out the android studio's shortcut was conflicted with system's shortcut. I don't know why it suddenly happen because it was fine before, maybe there was an update on my Mac.
See below setting for the conflicting shortcut
enter image description here

Solution 29 - Android Studio

Try Invalidate caches/Restart from File in Menu Bar from android studio.

Solution 30 - Android Studio

It worked for me. From menu select:

> File -> Power Save Mode

and make sure it's disabled

Solution 31 - Android Studio

  1. Close Android Studio.
  2. Go to C:/User/[SystemName] and delete .gradle file.
  3. Open Android Studio and sync gradle file again.

Solution 32 - Android Studio

I had the same problem for a while now. Until I searched through the Android Studio site and bumped with the introduction. Then I found how to activate (I think) the autocomplete feature. It says press Control+Space and when I did, it worked.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser2701882View Question on Stackoverflow
Solution 1 - Android StudioRenan FrancaView Answer on Stackoverflow
Solution 2 - Android Studiouser2904931View Answer on Stackoverflow
Solution 3 - Android StudioSagar MakhijaView Answer on Stackoverflow
Solution 4 - Android Studiomili2501View Answer on Stackoverflow
Solution 5 - Android StudioJorgesysView Answer on Stackoverflow
Solution 6 - Android Studiofree3domView Answer on Stackoverflow
Solution 7 - Android StudioMuhammad AliView Answer on Stackoverflow
Solution 8 - Android StudioHasaan AliView Answer on Stackoverflow
Solution 9 - Android StudioBen987654View Answer on Stackoverflow
Solution 10 - Android StudioMuhammad Ahmed AbuTalibView Answer on Stackoverflow
Solution 11 - Android StudioMd Nakibul HassanView Answer on Stackoverflow
Solution 12 - Android Studiowaheed shahView Answer on Stackoverflow
Solution 13 - Android StudioNidheesh GView Answer on Stackoverflow
Solution 14 - Android Studiojkin8010View Answer on Stackoverflow
Solution 15 - Android StudiosmaliView Answer on Stackoverflow
Solution 16 - Android StudioCaitlin MorrisView Answer on Stackoverflow
Solution 17 - Android StudioHai nguyen thanhView Answer on Stackoverflow
Solution 18 - Android StudioFxRi4View Answer on Stackoverflow
Solution 19 - Android StudiobeetstraView Answer on Stackoverflow
Solution 20 - Android StudioAndroidcoderView Answer on Stackoverflow
Solution 21 - Android StudioShariful Islam MubinView Answer on Stackoverflow
Solution 22 - Android StudioArun AdityaView Answer on Stackoverflow
Solution 23 - Android StudioShahriar SakibView Answer on Stackoverflow
Solution 24 - Android StudioKirtikumar A.View Answer on Stackoverflow
Solution 25 - Android StudioinvisboView Answer on Stackoverflow
Solution 26 - Android StudioA HashemiView Answer on Stackoverflow
Solution 27 - Android StudioKasun HasangaView Answer on Stackoverflow
Solution 28 - Android StudioIrfandi D. VendyView Answer on Stackoverflow
Solution 29 - Android StudioBaswaraj MamidgiView Answer on Stackoverflow
Solution 30 - Android StudioRehan KhanView Answer on Stackoverflow
Solution 31 - Android StudioMilan ShethView Answer on Stackoverflow
Solution 32 - Android StudioKeith PeñasView Answer on Stackoverflow