The plugin 'org.jetbrains.kotlin' could not be initialized and will be disabled. Restart Android Studio

After updating the Android Studio Kotlin plugin, it stops working. The plugin is automatically disabled. Below errors I get.

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) 
+5
source share
3 answers

To solve this problem you need to either upgrade or downgrade your kotlin plugin

Solution 1: update the plugin

First go to Tools> Select Kotlin> Configure Kotlin Plugin Updates> select one of the kotlin plugins and click download (stable or early access, I chose early access to solve this problem).

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


enter image description here

Solution 2: downgrade plugin

If you are using a mac , then press: Command + , to open the preference, then select the plugin and find kotlin and uninstall it, it will revert to the previous version: 1.1.51

On a Windows machine, press Control + Alt + S to open the settings dialog, then select the plugins and find kotlin and delete it, it will revert to the previous version: 1.1.51

enter image description here

Note: Do not uncheck kotlin in plugins, otherwise it will disable kotlin and will not be able to recognize the kotlin file and syntax

+10
source

If the update does not help with a downgrade

when I encounter the same problem with Android Studio 3.1 Canary 5 with version Kotlin v1.2.10-release-IJ2017.1-1 (latest version as December 15, 2017) I tried the above solution which did not work, so I just uninstalled update and returned it back to version 1.1.51 and worked without problems

+2
source

This problem was resolved in the latest version of the kotlin 1.2.0-release-Studio3.0-1 plugin . Try updating the kotlin plugin version.

0
source

Source: https://habr.com/ru/post/1273647/


All Articles