我在IntelliJ IDEA中有一个只支持Java的多模块Maven项目,每当我重新构建模块或选择运行所有测试时,我都可以看到IDEA调用Kotlin编译器。这显示在后台进程栏中。它有时也会显示Kotlin: connecting to daemon,这似乎需要相当长的时间。对于某个项目,有没有办法让IDEA完全忽略Kotlin?我猜构建时间可以通过这种方式加快一点。我知道我可以禁用Kotlin插件,但这不是我想要的,因为它对所有项目都是禁用的。
许多教程提到了一个类-- PsiClass,但是我在我的项目中找不到这个类。我的build.gradle如下:
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.4.16'
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
id 'idea'
}
apply plugin: "org.jetbrains.intellij"
app
我已经将现有的Maven项目导入到IntelliJ IDEA 2021.2中。Maven项目使用Kotlin版本1.5.21。但是,我收到警告,Maven中的版本与IntelliJ插件的版本不兼容,该版本为1.5.10,是最新的可用版本。在最新版本的IDEA中有使用Kotlin 1.5.21的方法吗?
我似乎无法让Firebase助手在Android中工作,并得到以下错误。
空
com.google.common.collect.Iterators$1.next(Iterators.java:81) at com.google.services.firebase.DependencyStateManager.getDependencyState(DependencyStateManager.java:60) at com.google.services.firebase.DependencyStateManager.init(DependencyStateManager.java
似乎我不能在IntelliJ IDEA (2018.3)和Android studio (3.2.1)中为Kotlin添加自定义后缀补全。如果我转到preferences | Editor | General | Postfix Completion并单击add按钮,Kotlin没有选项(见下面的截图)。可以添加新的后缀补全吗?
我想添加一个.with后缀补全,这样x.with就可以扩展到
with(x) {
// The caret should go here
}
附注:我认为这是一个遗憾,没有后缀完成的with开箱即用。
IntelliJ IDEA (2018.3)和Androi
最近,我将org.jetbrains.gradle.plugin.idea-ext插件添加到我的Gradle项目中。
plugins {
id "org.owasp.dependencycheck" version "6.1.6"
id "org.jetbrains.kotlin.jvm" version "1.4.32" apply false
id "org.jetbrains.kotlin.plugin.spring" version "1.4.32" apply f
我想使用Intelij创建Kotlin本地项目。根据,这个选项应该在项目向导的Kotlin子菜单下,但是由于某种原因,我没有它。此外,我似乎没有gradle子菜单,所以我想知道这两个问题是否有关联。
我使用的IDEA版本:
IntelliJ IDEA 2019.3.3 (Community Edition)
Build #IC-193.6494.35, built on February 11, 2020
Runtime version: 11.0.5+10-b520.38 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS
在intellij idea 16 EAP 144.3357.4中,我有一个纯Kotlin cmd项目目前拒绝使用此错误运行:
The binary version of its metadata is 1.0.1, expected version is 1.1.0
该项目在命令行上运行--我使缓存无效,并重新启动了Idea --没有任何帮助。有谁有同样的问题,找到办法让它起作用?
更新(2018-11-03)
这是一个已知的问题,正在跟踪。
原邮政
我正在玩Kotlin MPP,特别是Kotlin 1.3和新的结构。在将Kotlin 1.2 MPP转换为新结构后,我继续得到以下错误:
Error:(3, 18) Kotlin: [MPP_jvmMain] Declaration annotated with '@OptionalExpectation' can only be used in common module sources
这些是指我在我的公共模块中拥有的@JsName()注释。
我试过:
使用内置向导从头开始一个全新的MPP,并简单地将
当我尝试用IntelliJ中的Gradle重新加载我的项目时,我会失败。
FAILURE: Build failed with an exception.
* Where:
Initialization script 'C:\Users\yateu\AppData\Local\Temp\ijinit.gradle' line: 4
* What went wrong:
Could not compile initialization script 'C:\Users\yateu\AppData\Local\Temp\ijinit.gradle'.
>
我试图在Kotlin中使用@Serializable注释。我可以用Gradle构建这个项目,但是它在IntelliJ中显示为红色,当我在@Serializable注释上悬停时,有一条消息说:
kotlinx.serializable compiler plugin is not applied to the module, so this
annotation would not be processed. Make sure you've setup your buildscript
correctly and re-import project.
我的build.gradle
我目前正在尝试用IntelliJ IDEA运行一个简单的Kotlin程序。当我从这个页面运行Hello World示例时,我得到了这个错误和这个警告:
Warning:Kotlin: Classpath entry points to a non-existent location: C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.3.3\plugins\Kotlin\kotlinc\lib\kotlin-runtime.jar
Warning:Kotlin: Classpath entry points to a non-existen
我无法启动IntelliJ IDEA捆绑的Gradle扩展插件。
在带有插件的列表中,我得到以下消息:
如果我单击proposed链接,消息就会消失,但实际上什么也不会发生。
当我重新启动IDEA时,错误再次出现。
我能在日志中检测到的唯一有用的东西是这两行:
2021-05-21 13:16:25,332 [ 15802] INFO - #com.intellij.AbstractBundle - Cannot load resource bundle from *.properties file, falling back to slow class loading: mes