相关疑难解决方法(0)

Android Studio - 自动完成和其他功能无法正常工作

我安装了android studio ..它运行正常.现在突然间,没有一个自动完成功能正常工作..我可以在任何地方输入任何无变量检查,没有功能帮助或检查任何东西.我仍然可以编译项目,当发生这种情况时我会收到错误.

任何人都可以帮我解决这个问题.

android-studio

102
推荐指数
16
解决办法
12万
查看次数

kotlin 命令行编译器

如何使用js命令行编译器?

fun main(args: Array<String>): Unit { 
    println("Hello world!") 
}

E:\kotlinc\bin>kotlinc-js -output test -sourceFiles test.kt
ERROR: E:\kotlinc\bin\test.kt: (4, 5) Unresolved reference: println
exec() finished with COMPILATION_ERROR return code
Run Code Online (Sandbox Code Playgroud)

在 IDE 中我也无法让 js 编译工作。是否有 IntelliJ IDEA 12 的最新入门指南?

kotlin

5
推荐指数
1
解决办法
5242
查看次数

Kotlin Unresolved参考:CLI上的gradle println

println在kotlin函数之前放置一个语句会返回崩溃.堆栈跟踪:

thufir@dur:~/NetBeansProjects/kotlin$ 
thufir@dur:~/NetBeansProjects/kotlin$ gradle clean build --stacktrace
w: Classpath entry points to a non-existent location: 
e: /home/thufir/NetBeansProjects/kotlin/src/main/kotlin/example.kt: (14, 5): Unresolved reference: println

> Task :compileKotlin
Using Kotlin incremental compilation


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileKotlin'.
> Compilation error. See log for more details

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileKotlin'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at …
Run Code Online (Sandbox Code Playgroud)

java jvm gradle kotlin kotlin-interop

5
推荐指数
1
解决办法
2893
查看次数

子项目中未解决的对包的依赖

在我的 Kotlin spring boot 项目中,我使用的是 Kotlin DSL Gradle,包含三个子项目。其中两个security取决于database.

在 IntelliJ 中,应用程序成功运行并按预期执行(当作为 Spring Boot 应用程序运行配置运行时)。

但是,当我尝试使用 Gradle 构建项目时,./gradlew clean build我得到了

e: /security/src/main/kotlin/com/path/security/jwt/JwtRealm.kt: (3, 26): Unresolved reference: database
e: /security/src/main/kotlin/com/path/security/jwt/JwtRealm.kt: (19, 24): Unresolved reference: UsersRepository
e: /security/src/main/kotlin/com/path/security/jwt/JwtRealm.kt: (36, 48): Unresolved reference: it
e: /security/src/main/kotlin/com/path/security/jwt/JwtRealm.kt: (38, 42): Unresolved reference: it
e: /security/src/main/kotlin/com/path/security/jwt/JwtRealm.kt: (38, 75): Unresolved reference: it
e: /security/src/main/kotlin/com/path/security/jwt/JwtRealm.kt: (40, 63): Unresolved reference: it
> Task :security:compileKotlin FAILED
Run Code Online (Sandbox Code Playgroud)

它抱怨的实际线路是:

import com.path.database.repositories.UsersRepository
Run Code Online (Sandbox Code Playgroud)

it错误是从回购值。本UserRepository类是模块中database …

intellij-idea kotlin gradle-kotlin-dsl

4
推荐指数
1
解决办法
2121
查看次数

Kotlin 中函数“until”的未解析引用

我正在尝试将 Java 项目转换为 Kotlin。我收到一个非常奇怪的编译时错误,该函数直到是一个“未解决的引用”,为什么这个函数直到无法识别?

 fun renderChildrenToRight(canvas: Canvas, startIndex: Int, stopIndex: Int) {
    val itemRight = nodePosition!!.x + nodeRectLimits.right
    val itemExternalPaddingWidth = getRenderAttribute(AttributeExternalPaddingWidth, AttributeDefaultExternalPadding)
    val itemTop = nodePosition!!.y + nodeRectLimits.top
    val itemExternalPaddingHeight = getRenderAttribute(AttributeExternalPaddingHeight, AttributeDefaultExternalPadding)
    val childItemsSize = getChildItemsSize(startIndex, stopIndex)
    var nextItemTop = itemTop + childItemsSize / 2
    val x = itemRight + itemExternalPaddingWidth


    for (i in startIndex until stopIndex) {
        val currentNode = _children[i]
        val bulletDesiredHeight = currentNode.desiredHeightWithChildren
        val y = nextItemTop - bulletDesiredHeight / 2 …
Run Code Online (Sandbox Code Playgroud)

android kotlin android-gradle-plugin

1
推荐指数
1
解决办法
6281
查看次数