在Android Studio的Kotlin插件更新后,它停止了工作。插件自动被禁用。我得到以下错误。
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)
答案 0 :(得分:10)
要解决此问题,您必须升级或降级您的kotlin插件
解决方案1:升级插件
首先进入工具菜单>选择Kotlin>配置Kotlin插件更新>选择一个kotlin插件&按下载(稳定或早期访问,我选择提前访问以解决此问题)
最后根据改进build.gradle(Project :)中的kotlin版本 下载版本
解决方案2:降级插件
如果您在 mac 上,请按:Command + ,
打开首选项,然后选择插件&搜索kotlin&卸载它,它将回滚到以前的版本:1.1.51
在 Windows计算机上,按Control + Alt + S
打开设置对话框,然后选择插件&搜索kotlin&卸载它,它将回滚到以前的版本:1.1.51
请注意:请勿在插件中取消选中kotlin,否则会禁用kotlin&无法识别kotlin文件&语法
答案 1 :(得分:2)
如果升级没有帮助尝试降级
当我面对Android Studio 3.1 Canary 5与Kotlin版本v1.2.10-release-IJ2017.1-1(最新版本于2017年12月15日)的相同问题时,我尝试了上述无法正常工作的解决方案所以我刚刚卸载了更新,它又恢复到版本1.1.51,并且没有任何问题
答案 2 :(得分:0)
此问题已在最新的kotlin插件版本 1.2.0-release-Studio3.0-1 中得到解决。尝试更新kotlin插件版本。