Category "kotlin"

Kotlin Multiplatform issue : Type 'org.gradle.api.tasks.Copy' property 'sign' doesn't have a configured value

I am trying to build a KMM project everything works fine in Android also in iOS simulator but when I connect an iOS device I get the below error . FAILURE: Buil

Unsatisfied dependency: no bean matches the injection point

I use the Kotlin language to develop Quarkus based application. Regarding to the https://quarkus.io/guides/kotlin it is possible to write constructor injection

MainActivity is not showing log statements

Hi I am new to android development and the problem is Whenever I am using MainActivity in logcat as a filter it is not showing me Log statements for this Log.i

Confused about official Android documentation on Flow

I refer to the official Android documentation on using the Flow library in the recommended app architecture. In the UserRepository class: class UserRepository @

Service info.mqtt.android.service.MqttService has > leaked IntentReceiver

I keep having this error log when ever i toggle off a switch in my app. E/ActivityThread: Service info.mqtt.android.service.MqttService has leaked IntentReceiv

Can't cast okHTTP response as JSON

I am using okhttp 4.9.0 to make API requests, but seems that can't get the response body as JSONOBJECT. This is my code: client.newCall(request).enqueue(object

How to exclude a null value computed in JsonValue from JSON serialized by Jackson?

class Wrapper(private val value: String?) { @JsonValue fun asValue(): String? { return value } } val mapper = ObjectMapper()

Dagger-Hilt Did you forget to apply the Gradle Plugin? But I applied the plugin

Hello I'm trying to use the Dagger Hilt library In my project but when I'm trying to build it, it fails with this message public final class MyApplication exten

Parcel a List of objects from another Parcelable class in Kotlin

I'm working on a weather app for a class and I'm having some trouble with parcelable. I've looked at several other questions that are similar to this on StackO

pointerInput of Modifier takes no actions

I need a Card() Composable with a normal press and a long press functionality for a custom Card Composable. The thing is Card() has its own value called onClick

E/RecyclerView: No adapter attached; skipping layout . Adapter doesn't want to be recognized/detected

I'm really sorry for asking the same question like 100 other people did but i have tried every solution provided and I can't seem to find what is wrong with my

Jetpack Compose TopAppBar with dynamic actions

@Composable fun TopAppBar( title: @Composable () -> Unit, modifier: Modifier = Modifier, navigationIcon: @Composable (() -> Unit)? = null,

How support PhoneStateListener for APIs below 31?

I have discovered that the code of my application has been deprecated. I was using PhoneStateListener class but now I see that this decreasing for API 31 and th

Duplicated class Koin org.koin and io.insert-koin

I'm using two library that have dependencies of two different versions of Koin. One of the library has org.koin:koin-android:2.0.1 and the other has io.insert-k

Convert EditText to TextView Programatically? [duplicate]

What I Want I want to convert EditText into TextView programmatically. <EditText android:id="@+id/inputValue" android:layout_width=

How to add SafeArgs to new top level Kotlin gradle

I m gonna use Navigation Framework with fragments but at the dependency step, when i tried to add SafeArgs from documentation i see that the new top level gradl

Kotlin: issue with NestedScrollView with RecyclerView loading all data at start

I have a fragment that has multiple elements in it, some textViews, imageViews, a page ViewPager for ads and at the bottom I have a recyclerView. I want them a

Need help changing the button text using Android Studio

Sorry if asked before, but I don't find a solution on the web. As mentioned in the title, I don't know how to change the button text on this app (screenshot) th

If val variables are immutable how I was able to change its value?

class Mobile(val company: String= "unknown", var model: String ="unknown") { fun call(mobile: Mobile) = "Calling with ${mobile.model} from the company ${mobile.

Post request a raw json with Ktor client

I want to make post request with Ktor but I get Error 400. the curl looks like this : curl --location --request POST 'https://api.jdoodle.com/execute' \ --heade