当我试图执行以下代码时:
fun main(args: Array<String>) {
val x = BigInteger.ONE
var y = BigInteger.TEN
val z = x + y;
}
我要犯这个错误,出什么事了?我和1.0.0-beta-1038-IJ143-19一起工作
Error:(7, 15) Kotlin: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
p
我在Gradle下创建了新的Kotlin项目。默认情况下,它将此依赖项设置为Kotlin-库项目。我想知道这个kotlin-bom lib是做什么的?
dependencies {
// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
// Use the Kotlin JDK 8 standard library.
implementation("org.jetbrains.kotli
虽然运行一个颤振的应用程序,我面临失败,而格拉德尔建设。这个问题之前并没有出现,似乎是随机发生的。我不知道我要怎么做才能解决这个问题!
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve or
在从beta07更新到beta08之后构建代码时,执行失败并返回NullPointerException。 下面是完整的堆栈跟踪: e: java.lang.NullPointerException
at org.jetbrains.kotlin.ir.util.IrUtilsKt.getTypeSubstitutionMap(IrUtils.kt:548)
at org.jetbrains.kotlin.ir.util.IrUtilsKt.getTypeSubstitutionMap(IrUtils.kt:556)
at androidx.compose.compiler.plugins.
我正在开发一个应用程序,使用IntelliJ IDEA集成开发环境中的Kotlin语言和Gradle Build。我收到以下错误:
Exception in thread "main" kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath
at kotlin.jvm.internal.ClassReferenc
我正在使用Kotlin多平台(JVM & JS),它在IDEA中创建了三个项目:demo、demo-js和demo-jvm。
我想将公共代码分成更多的子项目/子模块。假设我添加了commonmod;如何使其编译?
现在,对于gradle run -p demo-jvm,错误是:
demo/demo-js/src/main/kotlin/demo/commonmod/example.kt: (3, 12): Actual function 'getPlatform' has no corresponding expected declaration
但是我认为我这样做是完
我已经将kotlin-reflect库添加到我的Android项目中,现在Proguard正在生成数百行注释,列出了所有具有名为INSTANCE的字段的类,其中当然包括每一个Kotlin object。
这只是Proguard输出的一小部分:
Note: kotlin.reflect.jvm.internal.KClassImpl$Data$objectInstance$2 accesses a declared field 'INSTANCE' dynamically
Maybe this is program field 'co.zsmb.example
将jetpack compose添加到我的应用程序后,如:所述,我在构建时看到以下错误:
Could not perform incremental compilation: Could not connect to Kotlin compile daemon
Could not connect to kotlin daemon. Using fallback strategy.
exception: java.lang.NoSuchMethodError: org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEv
我正在尝试用gradle kotlin DSL作为IntelliJ idea中的构建系统来设置一个kotlin项目,但是当我尝试运行buil.gradle.kts文件时,我得到了下面的错误。我尝试过不同的kotlin编译器版本,但没有成功。 warning: default scripting plugin is disabled: The provided plugin org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCompilerConfigurationComponentRegistrar is not compatib
在Maven项目中,我有一些使用Kotlin ScriptEngine (只需调用scriptEngine.eval(script))的测试。当我从IntelliJ运行测试时,它们都通过了,但是在运行mvn test的过程中,我得到了以下错误: javax.script.ScriptException: Cannot access script base class 'kotlin.script.experimental.jsr223.KotlinJsr223DefaultScript'. Check your module classpath for missing or
当我在android studio中运行我的第一个flutter应用程序时,我得到了这个错误。我的模拟器网络已连接,并且飞行模式已关闭。我看到了其他类似的问题,但它们都不像这个错误,它们对我没有帮助。有谁可以帮我?
Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
Could not resolve compiler classpath. Check if Kotlin Gradle plugin repository is conf
今天我刚刚更新了我的Android Studio
Android Studio 3.5.2
Build #AI-191.8026.42.35.5977832, built on October 31, 2019
JRE: 1.8.0_202-release-1483-b49-5587405 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.1
我更新了Android Studio,因为当kotlin版本低于1.3.60时,它会向我提示错误。
然而,我遇到了单元测试文件的问题。以前,我可以毫无问题地运行单元测试
当我尝试使用KotterKnife时,我得到了下面的错误--但只针对某些类。到底怎么回事?
e: /Users/user/dev/git/to14/android/src/main/kotlin/com.example/adapters/ChapterListAdapter.kt: (59, 34): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public fun <T : android.view.View> an
我上周更新了Kotlin 1.5,在昨天看到Google打算让Jetpack成为设计UI的首选方案之后,我想做一些测试。
问题是,将我的项目更新为Kotlin 1.5,在尝试构建该项目时,我会得到以下错误:
This version (1.0.0-beta07) of the Compose Compiler requires Kotlin version 1.4.32 but you appear to be using Kotlin version 1.5.0 which is not known to be compatible. Please fix your configurati
我的应用程序甚至没有使用kotlin,那么它怎么会向我索要kotlin插件呢?它显示了下面的错误,
12:16 AM Plugin Error
Problems found loading plugins:
Plugin "Android Support" was not loaded: required plugin "Kotlin" is disabled.
Plugin "WIFI ADB ULTIMATE" was
我是gradle的初学者,想在我的Kotlin项目中使用。
但是,我得到以下错误
Execution failed for task ':compileTestKotlin'.
> Error while evaluating property 'filteredArgumentsMap' of task ':compileTestKotlin'
> Could not resolve all files for configuration ':testCompileClasspath'.
>