https://kotlinlang.org
Join Slack
Is there a way to check device’s network connection in common code or we have to write platform spec...
p

ptsiogas

over 4 years ago
Is there a way to check device’s network connection in common code or we have to write platform specific code? Are there any working examples?
p
a
+2
  • 4
  • 11
  • 1205
Hey, everyone What should I “git ignore” in a kmm project? is there a .gitignore template for it?
h

henrikhorbovyi

about 3 years ago
Hey, everyone What should I “git ignore” in a kmm project? is there a .gitignore template for it?
➕ 1
h
l
m
  • 3
  • 7
  • 1203
Hi all, can we use firebase analytic on a KMM project?
b

brabo-hi

about 3 years ago
Hi all, can we use firebase analytic on a KMM project?
b
m
k
  • 3
  • 12
  • 1198
Hello, Seeing `w: Kapt currently doesn't support language version 2.0+. Falling back to 1.9.` in lo...
b

Berkeli Alashov

9 months ago
Hello, Seeing
w: Kapt currently doesn't support language version 2.0+. Falling back to 1.9.
in logs means it applies only for kapt right? i.e rest of the project is using kotlin 2.0, but kapt itself is falling back kotlin 1.9? Context: we have upgraded most of our modules to use kotlin 2.0 & ksp, but only 2 modules are using
id("kotlin-kapt")
(because of room-java) I'm guessing we will still be able to use kotlin 2.0 in those modules using kotlin-kapt, right?
👌 2
b
d
  • 2
  • 1
  • 1197
I'm getting this error with ktlint: ```Not a valid Kotlin file (expecting a parameter declaration) (...
p

pablisco

over 4 years ago
I'm getting this error with ktlint:
Not a valid Kotlin file (expecting a parameter declaration) (cannot be auto-corrected)
The line in question has a trailing comma, is this something we need to enable on ktlint? Or maybe we need to upgrade ktlint? I found this, but there doesn't seem to be any resolution, it's just closed 🤔 https://github.com/pinterest/ktlint/issues/729
p
r
d
  • 3
  • 4
  • 1197
Can you explain what this means? > Project accessors enabled, but root project name not explicitl...
n

Norbi

over 1 year ago
Can you explain what this means?
Project accessors enabled, but root project name not explicitly set for 'buildSrc'. Checking out the project in different folders will impact the generated code and implicitly the buildscript classpath, breaking caching.
I have a
buildSrc
project in my multi-project build but
rootProject.name
is set to the "real" root project, not
buildSrc
...
n
e
  • 2
  • 3
  • 1193
Hey guys what this error means? `Serializer has not been found for type 'ZonedDateTime'. To use con...
v

Vivek Modi

almost 3 years ago
Hey guys what this error means?
Serializer has not been found for type 'ZonedDateTime'. To use context serializer as fallback, explicitly annotate type or property with @Contextual
@Serializable
@Parcelize
data class NearestResult(
    val day: ZonedDateTime,
    val event: String
) : Parcelable
v
l
p
  • 3
  • 4
  • 1192
I am trying to display an image with jetpack compose… which is a normal PNG file inside drawable d...
r

Radoslaw Juszczyk

about 4 years ago
I am trying to display an image with jetpack compose… which is a normal PNG file inside drawable directory:
…res/drawable-xxxhdpi/ic_test.png
the code I use:
Image(painter = painterResource(id = R.drawable.ic_test), contentDescription = "Test")
produces this exception:
java.lang.IllegalArgumentException: Only VectorDrawables and rasterized asset types are supported ex. PNG, JPG
What am I doing wrong?
r
t
  • 2
  • 2
  • 1189
What’s the best way to get the “current scope” for a suspend function? In other words, `suspend fun ...
s

sam

over 5 years ago
What’s the best way to get the “current scope” for a suspend function? In other words,
suspend fun foo() { async { ... } }
. I’d like to use async inside foo, and inherit from whatever scope foo was called with.
s
w
o
  • 3
  • 26
  • 1189
How to add Jacoco plugin to TOML version catalog file Instead of `id("jacoco")` in the plugins sect...
h

Humphrey

about 2 years ago
How to add Jacoco plugin to TOML version catalog file Instead of
id("jacoco")
in the plugins section of build.gradle I would like to use
alias(libs.plugins.jacoco)
h
e
+2
  • 4
  • 26
  • 1183
Previous232425Next

kotlinlang

A modern programming language that makes developers happier.

Powered by