When I opened android studio today, it showed me the following errors:
Then, when after I restart Android Studio, I get these errors:
After I enable "Android Support", and restart, the first two errors show again, and when I restart again, I get this 3rd error again and the "Android Support" plugin is disabled again. (I even tried uninstalling and reinstalling Android Studio)
How can I fix this?
I have solved this problem this way:-
I was using Gradle 4.1 and AS 3.0.1 when I got this error.
Look at Gradle console. If it looks anything like this, read on:
Plugin Error
Problems found loading plugins:
Plugin "Android Games" was not loaded: required plugin "Android Support" is disabled.
Plugin "Android NDK Support" was not loaded: required plugin "Android Support" is disabled.
Plugin "Android APK Support" was not loaded: required plugin "Android Support" is disabled.
Plugin "Google Developers Samples" was not loaded: required plugin "Android Support" is ...
...
Plugin "Fire... (show balloon)
Note that all say “required plugin Android Support is disabled."
Also note the link “show balloon”.
Click show balloon
.
Choose to enable Android Support.
Restart AS.
I hope this helps you, too.
This can happen if a module is not added correctly.
Instead of adding the module folder, adding the build.gradle results in a broken project and issues with the Android Support plugins.
To check if this is the issue, try creating a new Android project. If the new project can be open fine (may require enabling the plugins and restarting Android Studio), then it is a project issue.
If this is the case, delete the incorrect module from the project, and if required re-enable the plugins and restart Android Studio.
TL;DR
I finally fixed it by removing .idea/workspace.xml
and reenabling plugins worked.
Same issue happened to me when I installed AS 3.1 beta alongside AS 3.0.1(stable) and opened my project in it. It was ok for few sessions, until it wasn't. Can't figure out what exactly broke project configuration, but project would open in 3.0.1 and not in 3.1. Any other project would work on 3.1 too. Symptoms were the same: android support plugin is disabled, and it wouldn't enable. I tried invalidating caches, reinstalling AS (even 3.1 stable version won't work).
Eventually I noticed projectBackup and projectBackup2 folders created by studio in the project's root folder. They contained versions of workspace.xml file. So I removed these backup folders, and workspace.xml from .idea folder. Then studio asked to reload project and that's it - after that I could reenable all the plugins
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With