com.intellij.diagnostic.PluginException 问题

关于作者:CSDN内容合伙人、技术专家, 从零开始做日活千万级APP。
专注于分享各领域原创系列文章 ,擅长java后端、移动开发、商业变现、人工智能等,希望大家多多支持。
未经允许不得转载

在这里插入图片描述

ddd

一、导读

遇到的一个比较坑的问题记录,真是一坑还比一坑深。

从github下载了一个开源库,导入studio后报如下错:

Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.

本来想快速无脑解决,通过搜索引擎尝试别的解决方式,点击setting - plugin - 找到 kotlin - 然后disable。

然后问题就来了,连android studio都启动不了,真是一个超级坑,

报错信息如下:

Internal error. Please refer to https://code.google.com/p/android/issues

com.intellij.diagnostic.PluginException: Fatal error initializing 'com.vladsch.md.nav.MdPlugin' [Plugin: com.vladsch.idea.multimarkdown]
    at com.intellij.serviceContainer.ComponentManagerImpl.handleInitComponentError$intellij_platform_serviceContainer(ComponentManagerImpl.kt:571)
    at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:59)
    at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:154)
    at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda$1(BaseComponentAdapter.kt:133)
    at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:99)
    at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:132)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:92)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:77)
    at com.intellij.serviceContainer.ComponentManagerImpl$createInitOldComponentsTask$1.invoke(ComponentManagerImpl.kt:394)
    at com.intellij.serviceContainer.ComponentManagerImpl$createInitOldComponentsTask$1.invoke(ComponentManagerImpl.kt:392)
    at com.intellij.idea.ApplicationLoader$initApplicationImpl$appInitializedListeners$1$1$2$1.invokeSuspend(ApplicationLoader.kt:139)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:788)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:758)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:389)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.NoSuchMethodError: 'void com.intellij.openapi.editor.colors.EditorColorsManager.addEditorColorsListener(com.intellij.openapi.editor.colors.EditorColorsListener, com.intellij.openapi.Disposable)'
    at com.vladsch.md.nav.MdPlugin.initComponent(MdPlugin.kt:130)
    at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:45)
    ... 25 more

-----
Your JRE: 17.0.6+0-b2043.56-10027231 amd64 (JetBrains s.r.o.)
E:\AS\jbr

这样问题就变成了如何启动 android studio工具,经历了删除各种studio缓存,卸载重装都没用,

最后终于找到一种行之有效的方法

Windows:

Just delete this file (or delete the last disabled plugin(s) in this file):

C:\Users\%USERNAME%\.AndroidStudio<version>\config\disabled_plugins.txt
If you can't find this address try this on Windows:

C:\Users\%USERNAME%\AppData\Roaming\Google\AndroidStudio<version>\disabled_plugins.txt
If you are using Windows 11 The App data folder is hidden and needs to be prompted(search how to take out the missing app data folder in Windows 11) Then go to the exact location as earlier mentioned and delete that file


macOS:

Delete or modify this file through this address:

/Users/%USERNAME%/Library/Application Support/Google/AndroidStudio<version>/disabled_plugins.txt

Linux:


Delete or modify this file through this address:

/home/%USERNAME%/.config/share/Google/AndroidStudio<version>/disabled_plugins.txt

问题解决,我们再回到kotlin 版本不对应的问题上来, 每个人的环境不一样,所以我们也只能说按照一些固定的方法来尝试

  1. 修改 gradle jdk的版号,如jdk8 jdk11

settings - build, execution … - build tools
在这里插入图片描述

For someone who is still looking for answer to this, here is the working solution for this problem.
In your project level open build.gradle file, increase the ext.kotlin_version from whatever current version
that you have like 1.5.0, to the latest stable version 1.6.0 (Whatever is latest at that time). Thanks

You can get latest version from here:

https://kotlinlang.org/docs/releases.html#release-details

二、 推荐阅读

Java 专栏

SQL 专栏

数据结构与算法

Android学习专栏

未经允许不得转载

猜你喜欢

转载自blog.csdn.net/fumeidonga/article/details/137607642