https://kotlinlang.org
Join Slack
Hi folks, II have a very strange flickering bug with Compose `Icon`s that I’m soliciting ideas for. ...
j

Jesse Hendrickson

about 2 years ago
Hi folks, II have a very strange flickering bug with Compose `Icon`s that I’m soliciting ideas for. Sometimes, Icons my app’s
BottomNavigation
`Icon`s will randomly flicker (see video). When stepping through the video frame by frame, you can see that it seems that they’re only partially drawn in certain frames. Does anyone have any ideas as to what’s going on here? Steps I’ve tried in the thread: 🧵
flickering.mov
j
e
+3
  • 5
  • 16
  • 792
I'm trying to mock private properties from in a companion object. When I run the tests they throw a...
m

mkrussel

over 4 years ago
I'm trying to mock private properties from in a companion object. When I run the tests they throw an exception.
io.mockk.MockKException: can't find property workerHandler for dynamic property get
Untitled.cpp
m
m
  • 2
  • 4
  • 792
Is there an equivalent of java CopyOnWriteArrayList in common code? I am trying to find an easy way ...
n

niqo01

almost 6 years ago
Is there an equivalent of java CopyOnWriteArrayList in common code? I am trying to find an easy way to share a mutable collection across threads in common code.
n
a
k
  • 3
  • 7
  • 792
I’m having a bit of trouble with the gradle shadow plugin `com.github.johnrengelman.shadow` I’m try...
c

Carter

over 4 years ago
I’m having a bit of trouble with the gradle shadow plugin
com.github.johnrengelman.shadow
I’m trying to create a fat JAR from various kotlin modules and my attempts to exclude transitive dependencies don’t seem to be working. My output JAR is truly fat at 820mb. I’ve tried doing this, which is what I think I need:
dependencies {
    implementation(project(":brainLib")) {
        transitive = false
    }
}
But I get the error:
Could not determine the dependencies of task ':brainLib:compileKotlinJvm'.
> Could not resolve all dependencies for configuration ':brainLib:jvmCompileClasspath'.
  > Cannot change dependencies of dependency configuration ':brainLib:commonMainApi' after it has been included in dependency resolution.
I also tried this, which is supposed to be like a “keep” rule in proguard, but that didn’t work either. (I think because the huge dependencies are transitive under brainLib).
shadowJar {
    minimize {
        exclude(project(":brainLib"))
    }
}
Are there other suggestions as to what I could try?
c
t
  • 2
  • 21
  • 791
[SOLVED] Is there a way to draw an ImageVector into Canvas? Particularly, I want to draw an Icon. I ...
d

Denis

over 4 years ago
[SOLVED] Is there a way to draw an ImageVector into Canvas? Particularly, I want to draw an Icon. I see
drawImage
method, but it accepts only an ImageBitmap. Probably I need to convert ImageVector to ImageBitmap, but I don't understand how
d
n
n
  • 3
  • 10
  • 791
Hi There, I am receiving following exception in some devices, can anyone help me to resolve? Fatal ...
d

Deepti M

over 5 years ago
Hi There, I am receiving following exception in some devices, can anyone help me to resolve? Fatal Exception: java.lang.RuntimeException Unable to start activity ComponentInfo{com.alivewallpaper.free/com.alivewallpaper.replicantlib.MainActivity}: org.koin.core.error.InstanceCreationException: Could not create instance for [Single:'com.google.firebase.database.FirebaseDatabase'] Precised logs:
Fatal Exception: java.lang.RuntimeException
Unable to start activity ComponentInfo{MainActivity}: org.koin.core.error.InstanceCreationException: Could not create instance for [Single:'com.google.firebase.database.FirebaseDatabase']
android.app.ActivityThread.performLaunchActivity
keyboard_arrow_down
 
Caused by org.koin.core.error.InstanceCreationException
Could not create instance for [Single:'com.google.firebase.database.FirebaseDatabase']
org.koin.core.instance.InstanceFactory.a
keyboard_arrow_down
 
Caused by com.google.firebase.database.DatabaseException
Calls to setPersistenceEnabled() must be made before any other usage of FirebaseDatabase instance
d
t
  • 2
  • 5
  • 791
Could any one explain to me the difference between wasm Js and wasm Wasi
s

soufianehamama9

almost 2 years ago
Could any one explain to me the difference between wasm Js and wasm Wasi
s
e
+3
  • 5
  • 13
  • 790
Hi folks, a question about `mutableStateListOf()` . add and remove on the list triggers succesful r...
f

faisalahmed

over 2 years ago
Hi folks, a question about
mutableStateListOf()
. add and remove on the list triggers succesful recompositions of the specific item, but changing the value at any index of this list does not trigger any recomposition. Been scratching my head at this. My
LazyColumn
is keyed to a unique
id
coming in the data as well. So I am wondering what might be going wrong. Following is an example. Inside
ViewModel
val list = mutableStateListOf<Messages>()

fun onMessageChanged(newMessage: Message) {
  val index = list.indexOf(newMessage) // returns correct index
  list[index] = newMessage // does not trigger recomposition
}
f
e
+2
  • 4
  • 9
  • 790
Seeing a crash related to compose not finding viewTreeLifecycleOwner, full stack trace in thread
s

Scott Kruse

about 4 years ago
Seeing a crash related to compose not finding viewTreeLifecycleOwner, full stack trace in thread
s
z
  • 2
  • 6
  • 790
I get this build error: `Cannot resolve external dependency org.jetbrains.kotlin:kotlin-stdlib-js:1....
d

Daniele B

about 5 years ago
I get this build error:
Cannot resolve external dependency org.jetbrains.kotlin:kotlin-stdlib-js:1.4.10 because no repositories are defined.
In my gradle.build.kts file, I actually have not even specified the version:
implementation(kotlin("stdlib-js"))
how can I fix this issue?
d
j
i
  • 3
  • 7
  • 788
Previous686970Next

kotlinlang

A modern programming language that makes developers happier.

Powered by