惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Announcements
Recent Announcements
J
Java Code Geeks
雷峰网
雷峰网
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
腾讯CDC
博客园 - 司徒正美
B
Blog RSS Feed
博客园 - 三生石上(FineUI控件)
I
InfoQ
N
Netflix TechBlog - Medium
L
LangChain Blog
博客园_首页
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
美团技术团队
The Cloudflare Blog
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
H
Help Net Security
Martin Fowler
Martin Fowler
V
Visual Studio Blog

博客园 - hangox

Claude Code 自定义状态栏配置指南 如何给 Claude 中的网页做截图 AGP 8.0+ Publish IDEA 不提示 gitlab-ci 字段问题 不要随便使用 npm 源加速站点 Xcode Format Swift 代码 idea Convert File To Kotlin File 多 Commit 问题 ApkList 源问题修复 BCM94360CS2 黑苹果 macOS Sonoma Wifi 不能开启修复 NginxProxyManager 数据库迁移记录 android ConcurrentModificationException 错误 Android Studio 插件分享——Gradle Utilities Android Studio 插件分享——Jadx Class Decompiler templete Android Studio 3.0 新特性 Android SpringAnimator初探 关于Android菜单上的记录 升级到 classpath 'com.android.tools.build:gradle:1.0.0-rc1 OnScrollListenerPro
idea 插件兼容 K2 模式
hangox · 2025-06-02 · via 博客园 - hangox

问题描述

Plugin 'xxxxx' wasn't loaded because it's incompatible with the Kotlin plugin in K2 mode

Main 2025-05-29 01.34.48

问题原因

如果你的插件使用了org.jetbrains.kotlin模块,没有做任何声明,默认就是不兼容的状态。

如何解决

如果你的插件只是对 kotlin 模块使用了 psi 可以直接在 plugins.xml增加下面的配置即可

<extensions defaultExtensionNs="org.jetbrains.kotlin">
    <supportsKotlinPluginMode supportsK2="true"/>
</extensions>

不要慌,增加之后就是红色的,这是正常的

验证

在启动参数直接加上启用 K2 即可,启动后没有看到显示上面的图即可

tasks {
    runIde {
     2
        jvmArgumentProviders += CommandLineArgumentProvider {
            listOf("-Didea.kotlin.plugin.use.k2=true")
        }
    }
}

参考文档

K2Test