Category "kotlin"

Updated intellij messed up Kotlin with 'Check your module classpath for missing or conflicting dependencies'

Lot's of frustration here. I decided to follow the pop-up prompting an intellij upgrade so it'd stop nagging me. And now I get a compiler error on certain parts

Ktor - kotlinx.coroutines.channels.ClosedReceiveChannelException: Channel was closed

I am receiving back this kotlinx.coroutines.channels.ClosedReceiveChannelException upon about 50% of my api calls to a post url through Ktor HttpClient. Our cod

How is Dart "sound null-safety" different from Kotlin null safety?

This Dart official video states that Dart's so-called "sound null safety" is better than Kotlin's null safety design, because it can optimise the code based on

Kotlin I can't add element to the end of the arrayOf

the problem is, that I can't understand differences between: ARRAY OF, LIST OF and ARRAY LIST OF I know, that arrays are mutable in nature, but list not. When I

RecyclerView Fragment calling itself onClick of the ListView with changed data using bundle in Android Kotlin using MVVM to separate data in VM class

So its just I want to ask question is in RecyclerView Fragment as, I want to buid a RecyclerView Fragment in MVVM by seprating the data in ViewModel separate Cl

Spring boot + Kotlin + MongoDb: Cannot resolve reference to bean 'mongoTemplate' while setting bean property

I am trying to make a simple application using kotlin and spring boot which connects to mongodb and makes some operations there, however I am facing this issues

Plugin 'kotlin-parcelize' not found

Google is recommending users to migrate from kotlin-android-extensions to kotlin-parcelize. However, Gradle sync fails with the following error: Plugin [id: 'ko

Mocking internal function call in Kotlin

I am a complete beginner in terms of Kotlin and I am finding some issues while trying to test out a Ktor based application. I have a file in my endpoints packag

Android app doesn't work the same with mobile data as with wifi

I have an App which repeatedly gets some data from an API. That works really good when I have a wifi connection. But with mobile data my request either times ou

Sending an ID or an object as String to the next screen in Jetpack Compose?

I have 30 users displayed in a LazyColumn. On user click, I navigate forward to UserDetailsScreen. My question, is it better to pass the ID of the user and crea

How to load image in Kotlin Compose desktop?

How to load images from the hard disk when using Kotlin compose on the desktop?

add third party library to kotlin multiplatform mobile shared module

Am writing a KMM mobile app that will be calling an AppSync API, my intention was to implement all the API calls in the shared module so that I don't have to wr

What's difference between "= remember" and " by remember" (Kotlin, Jetpack Compose)

I think two use case of remember exist. first one is @Composable fun abc() { var aa = remember { mutableStateOf(true) } } and second @Composable fun abc()

Dynamic list of custom items each with edit button. How to button binding?

I tried importing ObjLargeBinding, but idk what to do from there. Do I have to dynamically setOnClickListeners for each objective on screen? ''' import android.

How to resolve the error "LifecycleOwners must call register before they are STARTED"

I am using registerForActivityResult for google sign in implementation in my development. Everything was working fine until I upgraded my fragment dependency t

How to call custom uri using content provider kotlin

Basically what i want to call a SOS number using the android content provider from a smart watch. I have searched a lot but not able to find the correct path to

How to get error message in api call response in ktor

I am learning Ktor. I want to print error value or exception. I have taken some piece of code from this post. I don't understand this post answer fully. ApiResp

App/Scaffold white background changing issue in Jetpack Compose

Can anyone please point me out how to change this white background color of the app? Setting a color or background color on the Surface is having no impact. I'v

How to step through suspend function calls when debugging Kotlin coroutines

How is it possible to debug Kotlin code when stepping into or out of a "suspend" function? (see example below). fun mainFunction() = runBlocking { println

No activities found. Did you forget to launch the activity by calling getActivity() or startActivitySync or similar

When start my android app first start FirstActivity. When I click button on FirstActivity than start AddTraderActivity. If I press button "START REQUEST" in Add