https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
b

Benoît

02/12/2021, 12:38 PM
Hey guys, I'm getting this after doing some refactoring. Android compiles but iOS gives me this error
Copy code
e: Compilation failed: Backend Internal error: Exception during IR lowering
File being compiled: /Users/benoit/dev/project/business-logic/src/commonMain/kotlin/com/project/business_logic/BusinessLogicModule.kt
The root cause java.lang.IllegalArgumentException was thrown at: org.jetbrains.kotlin.backend.common.lower.SingleAbstractMethodLowering.createObjectProxy(SingleAbstractMethodLowering.kt:393)

 * Source files:
 * Compiler version info: Konan: 1.4.30 / Kotlin: 1.4.30
 * Output kind: FRAMEWORK

e: org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: /Users/benoit/dev/project/business-logic/src/commonMain/kotlin/com/project/business_logic/BusinessLogicModule.kt
The root cause java.lang.IllegalArgumentException was thrown at: org.jetbrains.kotlin.backend.common.lower.SingleAbstractMethodLowering.createObjectProxy(SingleAbstractMethodLowering.kt:393)
        at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException(CodegenUtil.kt:239)
        at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException$default(CodegenUtil.kt:235)


...


        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Sequence contains more than one matching element.
        at org.jetbrains.kotlin.backend.common.lower.SingleAbstractMethodLowering.createObjectProxy(SingleAbstractMethodLowering.kt:393)
        at org.jetbrains.kotlin.backend.common.lower.SingleAbstractMethodLowering.visitTypeOperator(SingleAbstractMethodLowering.kt:122)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitTypeOperator(IrElementTransformerVoid.kt:245)
Any idea ?
1
If that can help anyone, I somehow managed to fix the problem by moving an interface that was used by the class it mentioned , BusinessLogicModule. I just had to move it to another package of the same module, by looking at the stack trace I figured it was probably a naming issue when generating c .h file
10 Views