Category "kotlin"

Compose DslPart for complex json

Please could someone assist me create a dslPart object for the below json. I'm stuck at the components array within the content object for type: Component 2. I'

Make test task for kotlin incremental in Gradle?

I would like to make my test task incremental, but I noticed that it looks for files in java instead of kotlin: Task ':test' is not up-to-date because: Task.u

android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify

After upgrading to android 12, the application is not compiling. It shows "Manifest merger failed with multiple errors, see logs" Error showing in Merged mani

Retrieving a plain text error message from a call response

I am building out the login form for a client, and their backend, upon successfully authenticating the user, returns the user validation data in a JSONObject as

How to replace string characters that are not in a reference list in kotlin

I have a reference string on which the allowed characters are listed. Then I also have input strings, from which not allowed characters should be replaced with

Java Socket.IO-client SEVERE: Task threw exception

I try to connect to Web Socket server by using Socket.IO-client Java First i tried this config: fun createSocket(): Socket { val options = IO.Options()

Error uploading Multipart to MongoDB using Ktor

I'm trying to upload a JPEG to MongoDB using Ktor and Kotlin but keep getting an error: java.io.FileNotFoundException: /document/image:32: open failed: ENOENT (

Unable to set BottomSheetDialog initial height

I'm trying to set a height peek from which the dialog must start, then the user if dragged should be able to expand it, the issue is that in any case the bottom

unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)

I received this build error having updated my native android project to Android S (Pre release of android 12). Googling for the error threw up no valuable hits.

Android facebook share opens web page instead of native app

I am using Facebook share SDK and I read the docs which says that if the native Facebook app is installed then it will be used as a share dialog otherwise a web

Error inflating class com.google.android.material.bottomnavigation.BottomNavigationView in Kotlin

Dear team I am trying to use com.google.android.material.bottomnavigation.BottomNavigationView on my Kotlin application. While running the application, My appli

I am getting this issue, I tried using kotlin coroutines and Async still getting the same Calling this from Your main thread can lead to deadlock,

I also made another class that implements runnable to make a new thread still it's now working, Also tried with Aynctask. At last, I made a view model but still

how to flatten more than 2 array nested

I'm a newbie at Kotlin. And when I learn about flatten function Returns a single list of all elements from all arrays in the given array. It is description of

How to start the same action multiple times from the same startingDestination using navigation graph?

I started recently using the navigation graph and i have a problem that i havent solved yet. I want to open the same fragment multiple times that they are stack

Backend Internal error: Exception during psi2ir in Jetpack compose

I am getting this error during compilation or code generation, I have set the Jetpack Compose dependencies and working on it, I have made some compose component

Android dark mode follow system returns wrong mode unless killing the app

I'm implementing dynamic dark mode change in the app I'm working on and It's working great for MODE_NIGHT_YES and for MODE_NIGHT_NO but when I'm setting this on

Navigation Error: action/destination cannot be found from the current destination

I am using Navigation component to navigate between two Fragments. The landing fragment has a recycler view and the detail fragment has a view pager. I am using

Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio)

I've just updated my flutter project packages to be null-safety compliant and now Android Studio wants me to update my project to use the latest version of Kotl

Java/Kotlin Interoperability Limitations

I recently faced a problem regarding interoperability between Java/Kotlin for suspend functions. See my question: How to Override a suspend function in java cla

Failed to add navigation dependency

I am trying to Add Navigation in my project but its showing failed to add Navigation dependency, when i click on 'ok' in the window to add these now , its showi