我面临一些未知问题,看起来是内部编译器错误:

Error:org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't transform method node: doResume (Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;:
Error:org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction #375 L0: Incompatible stack heights
Error:org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Incompatible stack heights

任何帮助都将不胜感激.

推荐答案

我苦苦挣扎了很长时间,找到了解决方案,导致问题的代码是这样的:

  if (investorType=="Institutional")
            {linSignUp
                if (firmName.isEmpty()) {

There is a problem in first if block which a linSignUp a reference of linear layout which accidentally placed here, which should not be here. So the View just here alone with no use, when I removed it, the build generated successfully.

Kotlin相关问答推荐

Kotlin异步不并行运行任务

用vararg替换列表的设计弃用警告

当我通过媒体通知更改音乐时不要更新我的 UI

kotlin - 挂起简单方法调用链时可能存在冗余分支

如何在 Kotlin 中初始化 Short 数组?

Kotlin 获取继承类的默认 hashCode 实现

Rabin-Karp字符串匹配的实现(Rolling hash)

在协程上下文中重新抛出异常

Kotlin:使用另一个列表和字母顺序对列表进行排序的有效方法

内容更改后的 var 重新计算

Jetpack Compose - 单击 LazyColumn 的项目时应用程序崩溃

为什么 Kotlin 扩展运算符在传递原始可变参数时需要 toTypedArray()?

如何在 Kotlin 中使用 volatile

Android Room - error: Cannot figure out how to save this field into database

Kotlin get字段注释始终为空

Kotlin协程无法处理异常

Android studio 4.0 新更新版本说 Kotlin 与这个新版本不兼容

Kotlin Flow 收集后无法执行代码

Recyclerview: listen to padding click events

在Kotlin中创建通用二维数组