https://kotlinlang.org
Join Slack
Hi guys, i’m converting my existing Android app into KMM and i’m having really hard time configuring...
l

Loe

almost 3 years ago
Hi guys, i’m converting my existing Android app into KMM and i’m having really hard time configuring gradle. The specific issue i’m hitting now is with adding Firebase Libraries:
val commonMain by getting {
    dependencies {
        // Firebase: Import the BoM for the Firebase platform
        implementation(project.dependencies.platform("com.google.firebase:firebase-bom:31.0.2"))
        // Firebase: Cloud Firestore library BoM doesn't specify versions in Firebase library dependencies
        implementation("com.google.firebase:firebase-firestore-ktx")
        // Firebase: crashlytics
        implementation("com.google.firebase:firebase-crashlytics")

        // Firebase: Authentication
        implementation("com.google.firebase:firebase-auth-ktx")
        // Coroutines support libraries for Kotlin - required by firebase-analytics
        implementation("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.4")

        // TODO this is platform specific?
        //implementation("com.google.firebase:firebase-analytics-ktx")
    }
}
Error:
:shared:iosArm64Main: Could not resolve org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.4.
Required by:
    project :shared > com.google.firebase:firebase-firestore-ktx:24.4.0 > com.google.firebase:firebase-common-ktx:20.2.0

Possible solution:
 - Declare repository providing the artifact, see the documentation at <https://docs.gradle.org/current/userguide/declaring_repositories.html>
l
j
j
  • 3
  • 5
  • 899
how do i read a string from a `ByteReadChannel` ? i know there is `.readUTF8Line()` but what if my s...
l

LastExceed

over 5 years ago
how do i read a string from a
ByteReadChannel
? i know there is
.readUTF8Line()
but what if my string contains newlines ? do i have to convert the string to a bytearray and send that (preceded with its size) or is there a better way ?
l
e
  • 2
  • 5
  • 899
Hi there. I have a question - is it possible to change white background of the ComposeUIViewControll...
ł

Łukasz Zieliński

over 2 years ago
Hi there. I have a question - is it possible to change white background of the ComposeUIViewController to transparent? We can overlay Swift views over compose even with alpha, but the other way round seems impossible.
ł
i
+5
  • 7
  • 46
  • 897
I keep getting this error when trying to build Started on upgrade to Hedgehog Canary 12 Need help ...
r

Rudy Sulley

over 2 years ago
I keep getting this error when trying to build Started on upgrade to Hedgehog Canary 12 Need help An error occurred when parsing kotlin metadata. This normally happens when using a newer version of kotlin than the kotlin version released when this version of R8 was created. To find compatible kotlin versions, please see: https://developer.android.com/studio/build/kotlin-d8-r8-versions
👍 1
r
e
  • 2
  • 5
  • 897
I have implemented RSA encryption on kotlin backend and iOS client I am trying to decrypt some data ...
a

Anmol Verma

almost 3 years ago
I have implemented RSA encryption on kotlin backend and iOS client I am trying to decrypt some data encrypted using public key generated from iOS, the encryption works but decryption fails on iOS using the iOS private key for some reasons 🤔 But the same process works with a jvm app and android app. Has anyone successfully implemented something similar at their end ?
a
a
m
  • 3
  • 10
  • 895
I have a lazy column with a gradient background, and I want the gradient to be the entire height. BU...
c

Colton Idle

over 4 years ago
I have a lazy column with a gradient background, and I want the gradient to be the entire height. BUT after I start scrolling I want to gradient to scroll up/off of the screen. Any Ideas on how to implement? I currently have a Box { GradientBackground() LazyColumn() } but the Gradient (of course) doesn't move up. Is there anything Col or LazyCol provide for this sort of thing? Kind of like a "first page background", and then a background for everything below the device height?
c
z
a
  • 3
  • 16
  • 892
How to use coroutine's Flow class from scratch.kts file ? (I'm not using gradle in this time)
t

tateisu

about 5 years ago
How to use coroutine's Flow class from scratch.kts file ? (I'm not using gradle in this time)
t
j
a
  • 3
  • 7
  • 892
Is it possible to get scroll offset in pixels for `LazyColumn`? Can only see `firstVisibleItemScroll...
j

Jason Ankers

over 4 years ago
Is it possible to get scroll offset in pixels for
LazyColumn
? Can only see
firstVisibleItemScrollOffset
which is relative to items in the list
j
a
+2
  • 4
  • 14
  • 890
Hi, How I can collect value when my flow emit the same value? Now when I emit Option.Default, printl...
i

Ink

over 1 year ago
Hi, How I can collect value when my flow emit the same value? Now when I emit Option.Default, println doesn't invoke
var option: Option by mutableStateOf(Option.Default)
fun optionsFlow(): Flow<Option> = snapshotFlow { option }
option = Option.Default
launch{
state.optionsFlow().collectLatest{
println(it)
}
}
i
c
z
  • 3
  • 6
  • 889
Is there a reason Gradle can't support JVM 24 on the day it drops to stable? Candidly I'm surprised ...
s

Samuel Gammon

8 months ago
Is there a reason Gradle can't support JVM 24 on the day it drops to stable? Candidly I'm surprised more users are not upset about not being able to use JVM 24. Even if bytecode features at that tier are not supported yet by Kotlin's backend, having enum entries for future versions of Java makes sense, and would alleviate pressure to ship Kotlin Gradle Plugin updates in sync with releases. It used to be that JVM tier could be set by
Int
or
String
. Now we have (I think) no less than three enums and also a loss in functionality. How can that be possible? Surely there has to be a strong reason behind that.
s
h
t
  • 3
  • 10
  • 887
Previous565758Next

kotlinlang

A modern programming language that makes developers happier.

Powered by