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学习专栏

未经允许不得转载

  • 19
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 12
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Android西红柿

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值