Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plugin 'org.jetbrains.kotlin' failed to initialize and will be disabled. Please restart Android Studio

After Android Studio's Kotlin plugin update, It stopped working. Plugin is getting disabled automatically. Below error I am getting.

com.intellij.openapi.extensions.impl.PicoPluginExtensionInitializationException: Duplicate registration for EP: org.jetbrains.uast.uastLanguagePlugin: original plugin com.intellij, new plugin org.jetbrains.kotlin
at com.intellij.openapi.extensions.impl.ExtensionsAreaImpl.registerExtensionPoint(ExtensionsAreaImpl.java:286)
at com.intellij.openapi.extensions.impl.ExtensionsAreaImpl.registerExtensionPoint(ExtensionsAreaImpl.java:128)
at com.intellij.ide.plugins.IdeaPluginDescriptorImpl.registerExtensionPoints(IdeaPluginDescriptorImpl.java:328)
at com.intellij.ide.plugins.PluginManagerCore.registerExtensionPointsAndExtensions(PluginManagerCore.java:1352)
at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1264)
at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1393)
at com.intellij.ide.plugins.PluginManagerCore.getPlugins(PluginManagerCore.java:121)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentConfigs(ComponentManagerImpl.java:302)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:95)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:425)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:411)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:206)
at com.intellij.idea.MainImpl$1.lambda$null$0(MainImpl.java:49)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:343)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
like image 675
Chandra Sekhar Avatar asked Nov 25 '17 05:11

Chandra Sekhar


2 Answers

To solve this issue, you have to either upgrade or downgrade your kotlin plugin

Solution 1: Upgrade Plugin

First go to Tools menu > Select Kotlin > Configure Kotlin Plugin Updates > Select one of the kotlin plugin & press download (stable or early access, i chose early access to solve this issue)

And finally change the kotlin version in build.gradle(Project:) according to the downloaded version


enter image description here

Solution 2: Downgrade Plugin

If your on mac then press: Command + , to open preference, then select plugin & search for kotlin & uninstall it, it will rollback to previous version: 1.1.51

On Windows machine, press Control + Alt + S to open settings dialog, then select plugins & search for kotlin & uninstall it, it will rollback to previous version: 1.1.51

enter image description here

Please Note: Do not uncheck kotlin in plugins else it will disable kotlin & fail to recognise kotlin file & syntax

like image 139
Arshak Avatar answered Nov 29 '22 19:11

Arshak


If upgrading doesn't help try downgrading

when i faces the same issue with Android studio 3.1 Canary 5 with Kotlin version v1.2.10-release-IJ2017.1-1 (latest version as on 15 dec 2017) I tried the above solution which didn't work so i just uninstalled the update and it reverted back to version 1.1.51 and that worked without any issue

like image 29
trinadh thatakula Avatar answered Nov 29 '22 21:11

trinadh thatakula