common:linkPodReleaseFrameworkIos e: Compilation failed: Assertion failed - kotlin

I have a problem with archiving(realising my app).
I'm using the following dependency versions:
kotlin=1.6.10
ktor=2.0.0-beta-1
kotlinx.datetime=0.2.1
kotlinx.serialization=1.3.2
Tried to change versions of Kotlin serialisation plugin, or date time plugin but it hasn't fixed the issue. Any ideas where is the problem?
I'm receiving error:
Task :common:linkPodReleaseFrameworkIos
e: Compilation failed: Assertion failed
* Source files:
* Compiler version info: Konan: 1.6.0 / Kotlin: 1.6.0
* Output kind: FRAMEWORK
e: java.lang.AssertionError: Assertion failed
at org.jetbrains.kotlin.backend.konan.objcexport.MethodBridgeKt.parametersAssociated(MethodBridge.kt:120)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.generateKotlinToObjCBridge(ObjCExportCodeGenerator.kt:1029)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createReverseAdapter(ObjCExportCodeGenerator.kt:1180)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createReverseAdapters(ObjCExportCodeGenerator.kt:1463)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createReverseAdapters$getOrCreateFor(ObjCExportCodeGenerator.kt:1404)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createReverseAdapters(ObjCExportCodeGenerator.kt:1407)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.access$createReverseAdapters(ObjCExportCodeGenerator.kt:1)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGenerator.generateTypeAdaptersForKotlinTypes(ObjCExportCodeGenerator.kt:262)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGenerator.generateTypeAdapters(ObjCExportCodeGenerator.kt:289)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGenerator.generate$backend_native_compiler(ObjCExportCodeGenerator.kt:300)
at org.jetbrains.kotlin.backend.konan.objcexport.ObjCExport.generate$backend_native_compiler(ObjCExport.kt:103)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor$visitModuleFragment$2.invoke(IrToBitcode.kt:433)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor$visitModuleFragment$2.invoke(IrToBitcode.kt:431)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.runAndProcessInitializers(IrToBitcode.kt:370)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:431)
at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitModuleFragment(IrElementVisitorVoid.kt:28)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:204)
at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:204)

This is a bug, already described at https://youtrack.jetbrains.com/issue/KT-49395.
From what I see in this ticket, the problem should be already fixed in Kotlin 1.6.20-M1.If you can use preview versions in your project, consider trying it as described here: https://blog.jetbrains.com/kotlin/2022/02/kotlin-1-6-20-m1-released/.

Related

Forge 1.7.10 : Error while "gradlew setupDecompWorkspace"

I was trying to setup my modding environement and when i did 'gradlew setupDecompWorkSpace', this happen :
WARNING: You are using an unsupported version of ForgeGradle.
Please consider upgrading to ForgeGradle 4 and helping in the efforts to get old versions working on the modern toolchain.
See https://gist.github.com/TheCurle/fe7ad3ede188cbdd15c235cc75d52d4a for more info on contributing.
#################################################
ForgeGradle 1.2.2-g2ea0336
https://github.com/MinecraftForge/ForgeGradle
#################################################
Powered by MCP unknown
http://modcoderpack.com
by: Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
#################################################
:extractMcpData UP-TO-DATE
:getVersionJson
Unexpected reponse 403 from http://s3.amazonaws.com/Minecraft.Download/versions/1.7.10/1.7.10.json
:extractUserDev UP-TO-DATE
:genSrgs SKIPPED
:extractNatives UP-TO-DATE
:getAssetsIndex
Unexpected reponse 403 from https://s3.amazonaws.com/Minecraft.Download/indexes/1.7.10.json
:getAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':getAssets'.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.862 secs
C:\Users\Dimitri\eclipse-workspace\forge-1.7.10-10.13.4.1614-1.7.10-src>
I've tried to change the gradle version into the gradle-wrapper.properties from 2.0 to 2.6, It just lasted longer.
I'm not a professional in this but my workaround when I had this problem was replacing forge gradle with anatawa12's fork. I think what happened was some urls changed in one of the forge updates and forge 1.7.10 wasn't considered in the change.
New gradle: https://github.com/anatawa12/ForgeGradle-1.2
How to fix the Problem Method 1:
Follow: https://github.com/anatawa12/ForgeGradle-example#how-to-replace-forgegradle-12-with-anatawa12s-fork
Edit Gradle wrapper to use gradle 4.4.1 or higher.
How to fix the Problem Method 2:
Download and use anatawa12's example gradle template (same commands for cmd):
https://github.com/anatawa12/ForgeGradle-example/archive/master.zip

module can't find package com.google.gson.stream

a project i'm working with has a dependency on kotlin.jvm.internal.Intrinsics. so i added kotlin-gradle-plugin-1.5.0.jar. now i'm getting an error that it can't find gson.streams. any idea what this is all about?
Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: E:\jars\kotlin-gradle-plugin-1.5.0.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Package com.google.gson.stream not found in module
i already have gson-2.8,6.jar in my classpath.
The Jar kotlin-gradle-plugin version 1.5.0 seems to have runtime dependency with com.google.code.gson » gson
you can see that in the Runtime Dependencies section from here
In order to rectify this, you have to add it as a plugin
like below
plugins {
id 'org.jetbrains.kotlin.<...>' version '1.5.0'
}
This is the recommended way from here

Exception occurred applying plugin request[id:'org.jetbrains.kotlin.jvm', version:'1.3.40-eap-40']

An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.jvm', version: '1.3.40-eap-40']
> Failed to apply plugin [id 'org.jetbrains.kotlin.jvm']
> Cannot add extension with name 'kotlin', as there is an extension already registered with that name.
This error occurs in my build.gradle.kts file
Did you happen to see this error in a Kotlin Cocoapods project built from the samples provided on Kotlin/Native GitHub?
This error occurs because in the build.gradle.kts, there are conflicting plugin imports. Like seen below:
You can't have kotlin 'Jim' plugin and 'multi-platform plugin' together, so remove the kotlin("jvm") version "1.3.31" and build your gradle project.
Also, when you remove this will be accompanied by few more errors in the dependencies section. So comment out everything from dependencies and the two compile tasks below as well and build it. It should work!

sbt.compiler.EvalException: Type Error in Expression

I'm quite new with IntelliJ (and on this site too tbh) and have been using it for only a couple of days. When I tried to build my project this exception came up. I tried to solve the problem but to no avail. I tried to see if the same problem occured on a newly created project and yes it does. So the code I've written should have no influence on the build. Iäve also checked if there might be a problem with the sbt version but I am up to date.
This is what the error looks like. I have absolutely no clue how to solve this so any help would be very much appreciated.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[warn] Executing in batch mode.
[warn] For better performance, hit [ENTER] to switch to interactive mode, or
[warn] consider launching sbt without any commands, or explicitly passing 'shell'
[info] Loading global plugins from C:\Users\Johner-Institut\.sbt\0.13\plugins
Waiting for lock on C:\Users\Johner-Institut\.ivy2\.sbt.ivy.lock to be available...
[info] Loading project definition from C:\Users\Johner-Institut\Desktop\Project\project
C:\Users\Johner-Institut\Desktop\Project\build.sbt:5: error: recursive value project needs type
lazy val `project` = (project in file(".")).enablePlugins(PlayScala)
^
sbt.compiler.EvalException: Type error in expression
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
Don't use project as a name for sbt project, that's why the recursion error. Try something like:
lazy val root = (project in file(".")).enablePlugins(PlayScala)

Adding sub module to project causing gradle build failures in Android studio 3.0 with gradle version 4.1

I added sub module library vertical-stepper-form version 0.9.8, while I set dependency of this library on my app module. I was able to do it successfully.
I am using Android Studio 3.0 with gradle version 4.1, few of the classes in project are in kotlin and others in java
When I started gradle sync it gave me this error. The gradle is not building and showing below issues :
/*********************************/
Information:Gradle tasks [:vertical-stepper-form:generateDebugSources,
:vertical-stepper-form:generateDebugAndroidTestSources,
:vertical-stepper-form:mockableAndroidJar,
:app:generateInstallDebugSources,
:app:generateInstallDebugAndroidTestSources, :app:mockableAndroidJar]
D:\Devavrata\project/package/src/main/res/abc.xml Error:error:
attribute 'com.spireon.install:src' not found.
D:\Devavrata\AbcProject\abc-Android\app\build\intermediates\incremental\mergeInstallDebugResources\stripped.dir\layout\activity_main.xml
Error:attribute 'com.spireon.install:src' not found. Error:failed
linking file resources. Error:java.util.concurrent.ExecutionException:
java.util.concurrent.ExecutionException:
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for
details Error:java.util.concurrent.ExecutionException:
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for
details Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error:
check logs for details Error:Execution failed for task
':app:processInstallDebugResources'.
Failed to execute aapt Information:BUILD FAILED in 24s Information:7 errors Information:0 warnings Information:See complete output in
console
/********************************/
What I have already tried :
I tried with changing import lines in xml also changing the android:src and srcCompat properties. Along with build/project cleaning and invalidating the cache.
Changing this line in gradle.properties
android.enableAapt2=false
Let me know if anyone has faced this issue