https://kotlinlang.org
Join Slack
What do folks do with LongParameterList warnings? I used to recommend that people use a data class t...
k

kenkyee

over 5 years ago
What do folks do with LongParameterList warnings? I used to recommend that people use a data class to pass paramaters into a constructor or function to group the parameters logically. The current versions of Detekt also flag too many parameters in data class constructors... 😔
k
j
j
  • 3
  • 3
  • 534
Hi guys! Our multiplatform iOS app freezes when run from XCode after upgrading Kotlin to 1.9.2 (from...
p

Pavel Repkin

about 2 years ago
Hi guys! Our multiplatform iOS app freezes when run from XCode after upgrading Kotlin to 1.9.2 (from 1.8.22) In 10 seconds iPhone CPU usage goes from 20% to 200% and then the app freezes completely. Looking into XCode CPU profiler, the source of the load is “GC finalizer processor” thread, which is loaded 200%. See profiler screenshot below. This happens only while development (the app launched from XCode). This happens on a physical iPhone only. No freeze on the simulator. No freeze, if the iPhone is NOT connected to Mac. No freeze on Kotlin 1.8.22. A really weird issue. I wonder if anyone has noticed a similar behavior after upgrading to Kotlin 1.9?
➕ 1
👀 1
p
t
+2
  • 4
  • 10
  • 532
Hi guys! I’m trying to use KMP with android and react project. Is there any example for setting up? ...
n

nguyen tuan

almost 2 years ago
Hi guys! I’m trying to use KMP with android and react project. Is there any example for setting up? Many thx!
n
m
  • 2
  • 27
  • 532
> OkHttp 5 - Breaking: Drop support for Kotlin Multiplatform. Oh crap, really?
u

ursus

over 1 year ago
OkHttp 5 - Breaking: Drop support for Kotlin Multiplatform.
Oh crap, really?
u
e
+4
  • 6
  • 24
  • 531
How to mock a method with lambda argument, e.g. `AsyncTaskExecutor#submit`? Currently I'm doing thi...
d

David Kubecka

almost 3 years ago
How to mock a method with lambda argument, e.g.
AsyncTaskExecutor#submit
? Currently I'm doing this
val taskExecutor: AsyncTaskExecutor =
        mockk {
            every { submit(captureLambda()) } answers {
                CompletableFuture.completedFuture(lambda<() -> Int>().invoke())
            }
        }
but getting
Caused by: java.lang.ClassCastException: class java.lang.Object cannot be cast to class kotlin.Function (java.lang.Object is in module java.base of loader 'bootstrap'; kotlin.Function is in unnamed module of loader 'app')
I should probably use
hint
but not sure how exactly.
d
  • 1
  • 2
  • 531
Hi guys, I'm trying to use JPA specification with kotlin, but I'm having compilation errors... Has a...
h

hyukchan

almost 7 years ago
Hi guys, I'm trying to use JPA specification with kotlin, but I'm having compilation errors... Has anyone have good example to show ?
h
l
  • 2
  • 5
  • 531
What could be the cause of this? ```e: java.lang.Error: Something went wrong while checking for vers...
c

CLOVIS

over 2 years ago
What could be the cause of this?
e: java.lang.Error: Something went wrong while checking for version compatibility between the Compose Compiler and the Kotlin Compiler.  It is possible that the versions are incompatible.  Please verify your kotlin version  and consult the Compose-Kotlin compatibility map located at <https://developer.android.com/jetpack/androidx/releases/compose-kotlin>
	at androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar$Companion.checkCompilerVersion(ComposePlugin.kt:274)
	at androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar.registerProjectComponents(ComposePlugin.kt:199)
Caused by: java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.cli.common.messages.MessageCollector.report$default(org.jetbrains.kotlin.cli.common.messages.MessageCollector, org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity, java.lang.String, org.jetbrains.kotlin.cli.common.messages.CompilerMessageSourceLocation, int, java.lang.Object)'
	at androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar$Companion.checkCompilerVersion(ComposePlugin.kt:252)
Versions: • Kotlin 1.7.20 • Compose-jb 1.2.2 • Compose BOM 2023.01.00
c
l
+2
  • 4
  • 39
  • 530
Hello, When using BottomSheetScaffold is there a way to HALF_EXPAND it similar to ModalBottomSheet? ...
m

Manojna Chintapalli

almost 4 years ago
Hello, When using BottomSheetScaffold is there a way to HALF_EXPAND it similar to ModalBottomSheet? I see that it can be done using ModalBottomSheet, but the issue with using ModalBottomSheet is that when it is dismissed it disappears from the screen whereas BottomSheetScaffold can be shown at the bottom partially all the time. Thanks.
m
c
  • 2
  • 2
  • 530
How do i override spring dependency in gradle (kotlin) file? I'm using spring boot version `2.4.4` w...
r

rajesh

over 4 years ago
How do i override spring dependency in gradle (kotlin) file? I'm using spring boot version
2.4.4
which has
2.4.4
vesrion of
spring-boot-starter-data-redis
I want to use
2.4.7
version of it and tried following lines but it's not working
implementation("org.springframework.boot:spring-boot-starter-data-redis:2.4.7")
it says
Could not find org.springframework.boot:spring-boot-starter-data-redis:2.4.7.
Required by:
project :
I've also tried adding following line to build.gradle file with no luck
extra["spring-data-redis.version"] = "2.4.7"
r
s
m
  • 3
  • 19
  • 530
Hey I am working in kotlin flow in android. I noticed that my kotlin flow `collectLatest` is calling...
v

Vivek Modi

almost 4 years ago
Hey I am working in kotlin flow in android. I noticed that my kotlin flow
collectLatest
is calling twice and sometimes even more. I printed the log inside my
collectLatest
function it print the log.
v
m
  • 2
  • 11
  • 529
Previous119120121Next

kotlinlang

A modern programming language that makes developers happier.

Powered by