id
stringlengths
7
11
source
stringclasses
1 value
category
stringclasses
11 values
title
stringlengths
15
214
text
stringlengths
70
30.5k
url
stringlengths
57
160
tags
stringlengths
3
113
created_at
int64
1.22B
1.79B
se_79906848
stackoverflow
MOBILE_DEVELOPMENT
Conditional method in sealed class for returning same type
Conditional method in sealed class for returning same type I got this sealed class: sealed interface ResponseResult<out T> { data class Ok<T>(val value: T) : ResponseResult<T> data class Response(val response: ResponseEntity<Any>) : ResponseResult<Nothing> } My goal is to write a method which returns a Respon...
https://stackoverflow.com/questions/79906848/conditional-method-in-sealed-class-for-returning-same-type
kotlin
1,773,401,775
se_79864003
stackoverflow
MOBILE_DEVELOPMENT
After upgrade, Flyway initialization fails with &quot;Unknown prefix for location&quot;
After upgrade, Flyway initialization fails with &quot;Unknown prefix for location&quot; I upgraded Flyway from 9.x to 10.x, and followed up with adding the PostgreSQL plugin: # libs.versions.toml snippet [versions] flyway = "11.20.0" [libraries] flyway-core = { module = "org.flywaydb:flyway-core", version.ref = "flyw...
https://stackoverflow.com/questions/79864003/after-upgrade-flyway-initialization-fails-with-unknown-prefix-for-location
kotlin, flyway
1,767,943,651
se_79078709
stackoverflow
MOBILE_DEVELOPMENT
Making Material segmented buttons align without cutting off text
Making Material segmented buttons align without cutting off text I'm trying to do a seemingly simple usage of Material3's SingleChoiceSegmentedButtonRow, but I'm struggling to get the buttons to align with each other while not cutting off their text. Here's a minimal example: SingleChoiceSegmentedButtonRow( ) { va...
https://stackoverflow.com/questions/79078709/making-material-segmented-buttons-align-without-cutting-off-text
android, kotlin, android-jetpack-compose, android-jetpack-compose-material3
1,728,657,955
se_74639837
stackoverflow
MOBILE_DEVELOPMENT
Is there a way to allow negative decimals for TextField in Jetpack Compose on all Android versions?
Is there a way to allow negative decimals for TextField in Jetpack Compose on all Android versions? I'm trying to use an OutlinedTextField that allows both negative & positive decimal numbers. Currently, I have this code to change the keyboard type: keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Decimal...
https://stackoverflow.com/questions/74639837/is-there-a-way-to-allow-negative-decimals-for-textfield-in-jetpack-compose-on-al
android, kotlin, android-jetpack-compose, textfield, android-jetpack-compose-ui
1,669,887,932
se_63861095
stackoverflow
MOBILE_DEVELOPMENT
Jetpack Compose take screenshot of composable function?
Jetpack Compose take screenshot of composable function? I want to take screenshot of specific composable function on Jetpack Compose. How can I do this? Please, anyone help me. I want to take screenshot of composable function and share with other applications. Example of my function: @Composable fun PhotoCard() { ...
https://stackoverflow.com/questions/63861095/jetpack-compose-take-screenshot-of-composable-function
android, kotlin, android-jetpack-compose, android-jetpack
1,599,919,186
se_79904770
stackoverflow
MOBILE_DEVELOPMENT
Why do ANSI 256-color render incorrectly when running through Gradle rich console?
Why do ANSI 256-color render incorrectly when running through Gradle rich console? I style my terminal output with ANSI 256-color. fun main() { val reset = "\u001B[0m" val colors = listOf(66, 219, 153, 221, 203) for (c in colors) { val bg = "\u001B[48;5;${c}m" println("$bg BG $c $reset")...
https://stackoverflow.com/questions/79904770/why-do-ansi-256-color-render-incorrectly-when-running-through-gradle-rich-consol
kotlin, gradle, intellij-idea, terminal, ansi-escape
1,773,163,055
se_76074069
stackoverflow
MOBILE_DEVELOPMENT
java.lang.IllegalArgumentException: Cannot coerce value to an empty range: maximum 8.989999 is less than minimum 8.99
java.lang.IllegalArgumentException: Cannot coerce value to an empty range: maximum 8.989999 is less than minimum 8.99 I'm trying to achieve a rounding effect on values from rangeSlider (Compose): var sliderPosition by remember {mutableStateOf(minSelected..maxSelected)} // passed in the function parameters from the vie...
https://stackoverflow.com/questions/76074069/java-lang-illegalargumentexception-cannot-coerce-value-to-an-empty-range-maxim
android, kotlin, android-jetpack-compose
1,682,086,799
se_79603607
stackoverflow
MOBILE_DEVELOPMENT
Prevent Google Authentication when using spring.cloud.gcp.pubsub with emulator (locally)
Prevent Google Authentication when using spring.cloud.gcp.pubsub with emulator (locally) this is my first time here, so I hope I am doing everything right... I have a question that is puzzeling me for days now. I am using pubsub in my application. Locally I am using the emulator for development. That works quite fine,...
https://stackoverflow.com/questions/79603607/prevent-google-authentication-when-using-spring-cloud-gcp-pubsub-with-emulator
spring, kotlin, spring-cloud, spring-cloud-stream, spring-cloud-gcp
1,746,197,608
se_71959878
stackoverflow
MOBILE_DEVELOPMENT
clear() does not work for erasing markers while using Google Maps API
clear() does not work for erasing markers while using Google Maps API I'm using the Google Maps API in Kotlin and i'm trying to clear all the already generated markers from it before creating one of my own, but it doesn't seem to work. The code is below: val mapFragment:SupportMapFragment = supportFragmentMana...
https://stackoverflow.com/questions/71959878/clear-does-not-work-for-erasing-markers-while-using-google-maps-api
kotlin, google-maps, location, google-maps-markers
1,650,568,847
se_79904555
stackoverflow
MOBILE_DEVELOPMENT
Failed kotlin compilation in submodule
Failed kotlin compilation in submodule I have a multi module project. All working fine with java 8 and kotlin 2.3.0. I want to upgrade java up to 21. After upgrading java kotlin compilatin failing in one of submodules. But in another submodule compiled successfully. In parent POM kotlin-maven-plugin config: <plugin> ...
https://stackoverflow.com/questions/79904555/failed-kotlin-compilation-in-submodule
java, kotlin, maven
1,773,146,919
se_74529609
stackoverflow
MOBILE_DEVELOPMENT
How to convert kotlin Result type from List&lt;Result&lt;T&gt;&gt; to Result&lt;List&lt;T&gt;&gt;
How to convert kotlin Result type from List&lt;Result&lt;T&gt;&gt; to Result&lt;List&lt;T&gt;&gt; I have List<Result<String>> and I would like to convert it to Result<List<String>>. I understand that List<Result<String>> could have both failure and successful results but I would like to terminate in the first failure.
https://stackoverflow.com/questions/74529609/how-to-convert-kotlin-result-type-from-listresultt-to-resultlistt
kotlin
1,669,106,062
se_69266519
stackoverflow
MOBILE_DEVELOPMENT
How to handle background music while playing muted video in Flutter?
How to handle background music while playing muted video in Flutter? I have a Flutter app. On opening the app, the app will play a muted video, till here it's perfectly fine. But when I play music in Spotify in the background, and then I try to open my Flutter app, Spotify pauses the background music. So all I want is...
https://stackoverflow.com/questions/69266519/how-to-handle-background-music-while-playing-muted-video-in-flutter
android, ios, flutter, kotlin, android-audiomanager
1,632,216,548
se_79904193
stackoverflow
MOBILE_DEVELOPMENT
How to keep Android app running after it is removed from the recent tasks list?
How to keep Android app running after it is removed from the recent tasks list? I am developing an Android application using Kotlin. I want my app to continue running even after the user removes it from the recent tasks list (swipes the app away). Currently, when the user removes the app from the recent apps screen, t...
https://stackoverflow.com/questions/79904193/how-to-keep-android-app-running-after-it-is-removed-from-the-recent-tasks-list
android, kotlin
1,773,095,791
se_79896818
stackoverflow
MOBILE_DEVELOPMENT
How to query custom annotation symbols using KSP (Kotlin Symbol Processing) — including command-line usage?
How to query custom annotation symbols using KSP (Kotlin Symbol Processing) — including command-line usage? I am building a custom KSP processor to query symbols annotated with my own annotation. The goal is to: Find all classes/functions annotated with my custom annotation Process them at compile time Execute KSP fro...
https://stackoverflow.com/questions/79896818/how-to-query-custom-annotation-symbols-using-ksp-kotlin-symbol-processing-in
android, kotlin, command-line, ksp
1,772,094,990
se_76499024
stackoverflow
MOBILE_DEVELOPMENT
MaterialButtonToggleGroup addOnButtonCheckedListener called twice every time
MaterialButtonToggleGroup addOnButtonCheckedListener called twice every time For some bizarre reason, addOnButtonCheckedListener is called twice every time I click any of the buttons inside MaterialButtonToggleGroup. Below is my XML <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="...
https://stackoverflow.com/questions/76499024/materialbuttontogglegroup-addonbuttoncheckedlistener-called-twice-every-time
android, kotlin
1,687,062,400
se_52361839
stackoverflow
MOBILE_DEVELOPMENT
How to convert a string to class type in Kotlin?
How to convert a string to class type in Kotlin? I want to convert this string into AppDatabase type, I tried this Class.forName() but this is not working properly. val str = "com.crypto.wallet.data.AppDatabase_Impl@14731a42" my class path is "com.crypto.wallet.data.AppDatabase" I am new to Kotlin environment, ple...
https://stackoverflow.com/questions/52361839/how-to-convert-a-string-to-class-type-in-kotlin
android, kotlin, kotlin-android-extensions
1,537,165,408
se_79322568
stackoverflow
MOBILE_DEVELOPMENT
Some Kotlin runtime libraries and 29 other jars have an unsupported binary format - Supabase integration
Some Kotlin runtime libraries and 29 other jars have an unsupported binary format - Supabase integration I'm using AndroidStudio and Kotlin. I've been fairly successful until now and pretty much all functionalities I wanted are working, except the cloud backup and integration with Supabase. When I tried integrating it...
https://stackoverflow.com/questions/79322568/some-kotlin-runtime-libraries-and-29-other-jars-have-an-unsupported-binary-forma
android, kotlin, gradle, build.gradle, supabase
1,735,779,051
se_75085148
stackoverflow
MOBILE_DEVELOPMENT
How to use onDelete = RESTRICT in Room?
How to use onDelete = RESTRICT in Room? To prevent the deletion of a parent row which has one or more related child rows in my Room database, I've set my ForeignKey onDelete method to RESTRICT. My database has two tables: products and document_products which has the ForeignKey on products, during the application usage...
https://stackoverflow.com/questions/75085148/how-to-use-ondelete-restrict-in-room
android, kotlin, android-room
1,673,449,793
se_76492189
stackoverflow
MOBILE_DEVELOPMENT
Android Compose,focusRequester.requestFocus() causing Fatal Exception: Expected BringIntoViewRequester to not be used before parents are placed
Android Compose,focusRequester.requestFocus() causing Fatal Exception: Expected BringIntoViewRequester to not be used before parents are placed I am new to Android Compose and am working on a maintenance project. The following block of code is where the error is occurring: @ExperimentalMaterialNavigationApi @Experimen...
https://stackoverflow.com/questions/76492189/android-compose-focusrequester-requestfocus-causing-fatal-exception-expected
android, kotlin, android-jetpack-compose, jetpack-compose-accompanist
1,686,934,007
se_79226061
stackoverflow
MOBILE_DEVELOPMENT
Issue on Play Store Instant App &#39;Try Now&#39; button disappears
Issue on Play Store Instant App &#39;Try Now&#39; button disappears I have an existing base app published in both production and internal testing, currently at version code 100 (1.2.0). I then created a separate project for my instant app since its features are different from the base app. The instant app version code...
https://stackoverflow.com/questions/79226061/issue-on-play-store-instant-app-try-now-button-disappears
android, kotlin, gradle, android-instant-apps, google-play-internal-testing
1,732,613,331
se_72064782
stackoverflow
MOBILE_DEVELOPMENT
Correct way to retrigger loadTokens in Ktor client
Correct way to retrigger loadTokens in Ktor client In my mobile app, I have a singleton Ktor HttpClient with bearer authentication configured as such: HttpClient(…) { install(Auth) { bearer { sendWithoutRequest { requestBuilder -> some condition } loadTokens(tokensStorage::getTokens...
https://stackoverflow.com/questions/72064782/correct-way-to-retrigger-loadtokens-in-ktor-client
kotlin, ktor, ktor-client
1,651,277,811
se_79903198
stackoverflow
MOBILE_DEVELOPMENT
Android Storage Access Framework - Deletion possible without write access
Android Storage Access Framework - Deletion possible without write access I am currently implementing an android app with Kotlin and ran into some issues with the "new" Storage Access Framework (SAF). In my app the user can choose two folders, let's call them source and target. The app should only have read access to ...
https://stackoverflow.com/questions/79903198/android-storage-access-framework-deletion-possible-without-write-access
android, kotlin, android-storage
1,772,965,774
se_58443889
stackoverflow
MOBILE_DEVELOPMENT
How to make ZMQ pub client socket buffer messages while sub server socket is down
How to make ZMQ pub client socket buffer messages while sub server socket is down Given 2 applications where application A is using a publisher client to contentiously stream data to application B which has a sub server socket to accept that data, how can we configure pub client socket in application A such that when ...
https://stackoverflow.com/questions/58443889/how-to-make-zmq-pub-client-socket-buffer-messages-while-sub-server-socket-is-dow
java, sockets, kotlin, zeromq, jeromq
1,571,372,212
se_79901152
stackoverflow
MOBILE_DEVELOPMENT
Using kotlin.sourceSets DSL to add Kotlin sources is not allowed with built-in Kotlin
Using kotlin.sourceSets DSL to add Kotlin sources is not allowed with built-in Kotlin I'm trying to update gradle dependencies and use android.sourceSets DSL. I can't seem to find what is wrong with my configuration. How do I correct the gradle files so that I don't use the kotlin.sorceSets DSL anymore? This the build...
https://stackoverflow.com/questions/79901152/using-kotlin-sourcesets-dsl-to-add-kotlin-sources-is-not-allowed-with-built-in-k
kotlin, android-studio, gradle
1,772,654,766
se_74397250
stackoverflow
MOBILE_DEVELOPMENT
How to fix &quot;Can not extract resource from com.android.aaptcompiler.ParsedResource@16fe6971.&quot; Error
How to fix &quot;Can not extract resource from com.android.aaptcompiler.ParsedResource@16fe6971.&quot; Error I made very little changes to an App working properly before. And I tried to run it and got Can not extract resource from com.android.aaptcompiler.ParsedResource@16fe6971. error. I have no idea what is wrong, I...
https://stackoverflow.com/questions/74397250/how-to-fix-can-not-extract-resource-from-com-android-aaptcompiler-parsedresourc
android, android-studio, kotlin, android-jetpack-compose
1,668,131,580
se_79902775
stackoverflow
MOBILE_DEVELOPMENT
KSP error on doing migration to AGP9, no support for KspConfiguration
KSP error on doing migration to AGP9, no support for KspConfiguration The new AGP9 migration steps include to change from com.android.library into com.android.kotlin.multiplatform.library , but when I did, I got error An exception occurred applying plugin request [id: 'com.google.devtools.ksp', version: '2.3.6'] > Fa...
https://stackoverflow.com/questions/79902775/ksp-error-on-doing-migration-to-agp9-no-support-for-kspconfiguration
kotlin, gradle, android-gradle-plugin, kotlin-multiplatform
1,772,884,726
se_79902552
stackoverflow
MOBILE_DEVELOPMENT
Using @POST instead of @ GET in REST API?
Using @POST instead of @ GET in REST API? The typical @POST format in a REST API is like (I am writing for Kotlin): @POST("users") suspend fun addpost( @Body post:Post) : Post After posting, I can just fetch that same data, or even list of data, through only @POST, i.e. in a modern day app login system where the...
https://stackoverflow.com/questions/79902552/using-post-instead-of-get-in-rest-api
android, kotlin, rest
1,772,834,531
se_79902608
stackoverflow
MOBILE_DEVELOPMENT
How to map numbered JSON fields to a list using Kotlinx Serialization
How to map numbered JSON fields to a list using Kotlinx Serialization I’m working with an API (TheMealDB) that returns ingredients in this format: { "strIngredient1": "Salmon", "strIngredient2": "Soy Sauce", "strIngredient3": "Sugar", ... "strIngredient20": null, "strMeasure1": "2 fillets", "strMeasure2": "3 tbsp", "s...
https://stackoverflow.com/questions/79902608/how-to-map-numbered-json-fields-to-a-list-using-kotlinx-serialization
android, kotlin, ktor, kotlinx.serialization
1,772,844,976
se_68728445
stackoverflow
MOBILE_DEVELOPMENT
How to see local variables values when debugging Kotlin Coroutines in IDEA?
How to see local variables values when debugging Kotlin Coroutines in IDEA? When the debugger stops on breakpoint somewhere in Kotlin Coroutines code, I usually suffer from the inability to access local variables values (they are out of scope and inaccessible due to the nature of Coroutines implementation). Is there a...
https://stackoverflow.com/questions/68728445/how-to-see-local-variables-values-when-debugging-kotlin-coroutines-in-idea
kotlin, intellij-idea, kotlin-coroutines
1,628,604,773
se_75981022
stackoverflow
MOBILE_DEVELOPMENT
Image alignment and size are changing during recompose in lazyRow. Jetpack Compose
Image alignment and size are changing during recompose in lazyRow. Jetpack Compose All I want is to create an image with a certain height. Automatically changing the width without breaking the width/height ratio of the image I took from the url.Then align it to start. When i run this code first images which shown in s...
https://stackoverflow.com/questions/75981022/image-alignment-and-size-are-changing-during-recompose-in-lazyrow-jetpack-compo
android, image, kotlin, android-jetpack-compose, coil
1,681,163,644
se_79902105
stackoverflow
MOBILE_DEVELOPMENT
How to switch back from the payment app back to my app?
How to switch back from the payment app back to my app? I have an issue on a SUNMI P2 terminal that has integrated NEXO protocol and Besteron for payment. To process the payment a HTTP request is sent from my app to the NEXO API which then displays the Besteron's UI that tells the user to use a card. When the the card...
https://stackoverflow.com/questions/79902105/how-to-switch-back-from-the-payment-app-back-to-my-app
android, kotlin, android-intent, sunmi
1,772,785,179
se_79900274
stackoverflow
MOBILE_DEVELOPMENT
Set an optional argument of IntType in a Route for Androidx Navigation
Set an optional argument of IntType in a Route for Androidx Navigation I'm using Androidx Navigation as a router in my app, whereas I have a bunch of different routes, and one has some arguments of the shape: route?$sectionArg={$sectionArg}&itemId={$itemId}. For example, a route for this navigation destination could b...
https://stackoverflow.com/questions/79900274/set-an-optional-argument-of-inttype-in-a-route-for-androidx-navigation
kotlin, android-jetpack-compose, android-navigation, android-navigation-graph
1,772,555,316
se_77380150
stackoverflow
MOBILE_DEVELOPMENT
How to center and space boxes in Jetpack Compose?
How to center and space boxes in Jetpack Compose? I have a grid with three items. I would like all my boxes to be vertically centered with spaces/padding in between. Currently, this code outputs my boxes to be spaced apart(with padding), but if I change to verticalArrangement = Arrangement.Center, it centers my boxes ...
https://stackoverflow.com/questions/77380150/how-to-center-and-space-boxes-in-jetpack-compose
android, kotlin, android-jetpack-compose, android-jetpack, modifier
1,698,507,819
se_79780652
stackoverflow
MOBILE_DEVELOPMENT
Google Pixel 8 PRO keeps switching to the wide lens camera when trying to scan barcodes
Google Pixel 8 PRO keeps switching to the wide lens camera when trying to scan barcodes I have an app for scanning barcodes, and I have ran into an issue since replacing an old non maintained camera library with cameraX and MLKit. The problem is that when scanning barcodes on the Google Pixel 8 PRO, the phone keeps ch...
https://stackoverflow.com/questions/79780652/google-pixel-8-pro-keeps-switching-to-the-wide-lens-camera-when-trying-to-scan-b
android, kotlin, android-camera2, android-camerax, google-pixel
1,759,385,413
se_79901351
stackoverflow
MOBILE_DEVELOPMENT
Ktor TCP readbyte
Ktor TCP readbyte I would like to ask or assure. If I want to read raw bytes from the tcp connection using ktor in KMP it is not possible or there is no native library function which can help me to read all bytes within one TCP packet. I mean I need to read all bytes within one TCP packet which length might be maybe s...
https://stackoverflow.com/questions/79901351/ktor-tcp-readbyte
kotlin, tcp, ktor, raw
1,772,694,130
se_72107646
stackoverflow
MOBILE_DEVELOPMENT
What does &quot;intrinsic&quot; implementation mean in Kotlin?
What does &quot;intrinsic&quot; implementation mean in Kotlin? When browsing through Kotlin source code, I found that in some places NotImplementedError is thrown: public suspend inline val coroutineContext: CoroutineContext get() { throw NotImplementedError("Implemented as intrinsic") } public suspen...
https://stackoverflow.com/questions/72107646/what-does-intrinsic-implementation-mean-in-kotlin
kotlin, kotlin-coroutines
1,651,635,063
se_79891822
stackoverflow
MOBILE_DEVELOPMENT
Flir One Edge Pro not connecting to personal android app
Flir One Edge Pro not connecting to personal android app I am trying to connect my Flir One Edge Pro to my android app using the Flir Mobile SDK. This is for my university project and I am really struggling to connect to this device. I have spent over 25 hours trying to connect my app to this device. I'm using FLIR_ON...
https://stackoverflow.com/questions/79891822/flir-one-edge-pro-not-connecting-to-personal-android-app
android, kotlin, flir
1,771,445,760
se_79901012
stackoverflow
MOBILE_DEVELOPMENT
Where can I install Eclipse Kotlin Plugin 0.7.x version?
Where can I install Eclipse Kotlin Plugin 0.7.x version? I need to use an older version of Eclipse - Neon or Photon - so i needed to use older version of the Kotlin plugin. However even if I try to use Install New Software there is no public URL for Kotlin Plugin 0.7.x. Only 0.8.21 and 0.8.24 are hosted in https://fil...
https://stackoverflow.com/questions/79901012/where-can-i-install-eclipse-kotlin-plugin-0-7-x-version
eclipse, kotlin
1,772,640,484
se_79045905
stackoverflow
MOBILE_DEVELOPMENT
How can I deep link to UPI Payment apps and pay without being a merchant?
How can I deep link to UPI Payment apps and pay without being a merchant? I am trying to initiate a UPI payment from my Jetpack Compose app. To create the intent string, I tried this method. fun getUPIString( payeeAddress: String, payeeName: String, trxnNote: String, payeeAmount: String, transactio...
https://stackoverflow.com/questions/79045905/how-can-i-deep-link-to-upi-payment-apps-and-pay-without-being-a-merchant
android, kotlin, android-jetpack-compose
1,727,857,233
se_79895128
stackoverflow
MOBILE_DEVELOPMENT
&quot;Flutter Android build fails on every plugin with &#39;Unresolved reference Registrar&#39; despite all cleaning attempts&quot;
&quot;Flutter Android build fails on every plugin with &#39;Unresolved reference Registrar&#39; despite all cleaning attempts&quot; I am unable to build the Android version of a Flutter project. Every time I fix one plugin, the build fails on the next one with the same error: Unresolved reference 'Registrar'. The late...
https://stackoverflow.com/questions/79895128/flutter-android-build-fails-on-every-plugin-with-unresolved-reference-registra
android, flutter, kotlin, android-gradle-plugin, speech-to-text
1,771,906,537
se_79899548
stackoverflow
MOBILE_DEVELOPMENT
Kotlin DSL: Replacement for android.bootClasspath
Kotlin DSL: Replacement for android.bootClasspath android.sdkDirectory and android.bootClasspath don't exist in Kotlin DSL. For android.sdkDirectory I can use $ANDROID_HOME: val javadocs by tasks.registering(Javadoc::class) { val sdkDirectory = System.getenv("ANDROID_HOME") classpath = files(File("${sdkDirecto...
https://stackoverflow.com/questions/79899548/kotlin-dsl-replacement-for-android-bootclasspath
android, kotlin, gradle, gradle-kotlin-dsl, bootclasspath
1,772,468,228
se_58514019
stackoverflow
MOBILE_DEVELOPMENT
Kotlin Coroutine - Keeping Channel Send Event Synchronous
Kotlin Coroutine - Keeping Channel Send Event Synchronous I have a class which listens to events coming from a socket at a very fast pace. I would like to feed these events into a coroutine Channel. The following code is used: class MyClass(channel: Channel<String>) : ... { ... override onMessageReceived(message...
https://stackoverflow.com/questions/58514019/kotlin-coroutine-keeping-channel-send-event-synchronous
kotlin, channel, coroutine
1,571,791,869
se_79898101
stackoverflow
MOBILE_DEVELOPMENT
PlanningEntity referencing another PlanningEntity and ValueRangeProvider on PlanningEntity throws IllegalStateException
PlanningEntity referencing another PlanningEntity and ValueRangeProvider on PlanningEntity throws IllegalStateException I have the following working problem model: @PlanningSolution data class ExamSchedule( // --- Constraint Parameters --- @ProblemFactProperty val constraintParameters: ConstraintParameters...
https://stackoverflow.com/questions/79898101/planningentity-referencing-another-planningentity-and-valuerangeprovider-on-plan
kotlin, timefold
1,772,223,383
se_77653593
stackoverflow
MOBILE_DEVELOPMENT
anyObject() must not be null using EasyMock in Kotlin
anyObject() must not be null using EasyMock in Kotlin I am using EasyMock with Kotlin. There is a sample class that I try mocking. The issue I continuously receive is that anyObject, independently with or without a specific class, throws NullPointerException due to Kotlin being stricter than Java with typing. java.la...
https://stackoverflow.com/questions/77653593/anyobject-must-not-be-null-using-easymock-in-kotlin
spring-boot, kotlin, logging, mocking, easymock
1,702,470,557
se_79677087
stackoverflow
MOBILE_DEVELOPMENT
Mapping R2DBC query result for a row with a column of array postgresql type
Mapping R2DBC query result for a row with a column of array postgresql type Stack: Kotlin 2.1.21, Spring Boot 3.5.3, Spring Data R2DBC 3.5.1 I got the folowwing code enum class TimeTypesEnum { FULL, PARTIAL; companion object { fun from(value: String): TimeTypesEnum = TimeTypesEnum.entries.firstOrNull { ...
https://stackoverflow.com/questions/79677087/mapping-r2dbc-query-result-for-a-row-with-a-column-of-array-postgresql-type
spring-boot, kotlin, spring-data-r2dbc, r2dbc, r2dbc-postgresql
1,750,745,596
se_79899447
stackoverflow
MOBILE_DEVELOPMENT
Best practice to reset third-party app sessions on Android TV after hotel guest checkout?
Best practice to reset third-party app sessions on Android TV after hotel guest checkout? I’m working on an Android TV deployment for hospitality environments. Each room uses a customized build where our application is set as the main interface shown to guests. A problem we’re facing is related to third-party apps. Gu...
https://stackoverflow.com/questions/79899447/best-practice-to-reset-third-party-app-sessions-on-android-tv-after-hotel-guest
android, kotlin, android-tv
1,772,458,023
se_62817971
stackoverflow
MOBILE_DEVELOPMENT
How to use spyk
How to use spyk I need to verify that a method has been called on an object. So I make a spy of this object: obj = spyk(obj) And then I verify that a method has been called: verify(exactly = 1) { obj.f(3) } The test fails with the following error message: java.lang.AssertionError: Verification failed: call 1 of 1: o...
https://stackoverflow.com/questions/62817971/how-to-use-spyk
kotlin, mockk
1,594,307,249
se_56639045
stackoverflow
MOBILE_DEVELOPMENT
Android webview load html, then set variable, then load script
Android webview load html, then set variable, then load script I have this html in my assets folder. <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <script type="text/javascript"> var publicKey = "" func...
https://stackoverflow.com/questions/56639045/android-webview-load-html-then-set-variable-then-load-script
android, kotlin, android-webview
1,560,806,383
se_79892829
stackoverflow
MOBILE_DEVELOPMENT
Media3: How to dynamically update MediaSession notification for a custom sound mixer?
Media3: How to dynamically update MediaSession notification for a custom sound mixer? I am developing an Android app using Kotlin and Jetpack Compose. It's a sound mixer where multiple audio tracks (loops) play simultaneously. I have AudioMixerRepository holding a map of several ExoPlayer instances (one for each sound...
https://stackoverflow.com/questions/79892829/media3-how-to-dynamically-update-mediasession-notification-for-a-custom-sound-m
android, kotlin, exoplayer, android-mediasession, android-media3
1,771,581,971
se_77770190
stackoverflow
MOBILE_DEVELOPMENT
Using generics in kotlin that support multiplication
Using generics in kotlin that support multiplication I have the following code and trying to make it generic so it will accept Int, Float, Long, Double. I think the issue is that Number doesn't have any add, subtract, multiple, etc. Just wondering what I can do? private fun <T: Number> productNumbers(listOfNumbers: Li...
https://stackoverflow.com/questions/77770190/using-generics-in-kotlin-that-support-multiplication
kotlin, generics
1,704,559,332
se_66945802
stackoverflow
MOBILE_DEVELOPMENT
Installing Kotlin-Jupyter: e: java.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel
Installing Kotlin-Jupyter: e: java.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel I'm new to Gradle, but recently I wanted to use Kotlin-Jupyter notebook for a project. I followed the instructions, I cloned the repo at https://github.com/Kotlin/kotlin-jup...
https://stackoverflow.com/questions/66945802/installing-kotlin-jupyter-e-java-lang-noclassdeffounderror-could-not-initiali
java, kotlin, gradle, jupyter-notebook, jupyter
1,617,569,886
se_77349392
stackoverflow
MOBILE_DEVELOPMENT
how to know when the RFID gun button trigger is pressed on the RFD40 + TC21
how to know when the RFID gun button trigger is pressed on the RFD40 + TC21 How can I know when the gun trigger is pressed programmatically using Zebra DataWedge 11.3.28 using an intent broadcaster on a RFD40 + TC21? I am using one of the examples from Zebra object DataWedgeUtility { private const val PROFILE_NAME...
https://stackoverflow.com/questions/77349392/how-to-know-when-the-rfid-gun-button-trigger-is-pressed-on-the-rfd40-tc21
android, kotlin, rfid, datawedge, zebra-rfid-sdk
1,698,118,690
se_79897668
stackoverflow
MOBILE_DEVELOPMENT
Performance Issue: 2x2, 3x3 Grid Video Playback Lag on Android TV
Performance Issue: 2x2, 3x3 Grid Video Playback Lag on Android TV I am currently facing a performance issue while testing my Android TV application. When I configure a 2x2 grid layout and play local videos (approximately 1 GB each) from the device storage, the playback starts lagging on the physical TV device. The vid...
https://stackoverflow.com/questions/79897668/performance-issue-2x2-3x3-grid-video-playback-lag-on-android-tv
android, kotlin, android-jetpack-compose
1,772,183,781
se_79896321
stackoverflow
MOBILE_DEVELOPMENT
Android 15/16: returning from browser (deeplink) causes mixed DayNight theme in fragments (new fragments use system dark, old fragments stay light)
Android 15/16: returning from browser (deeplink) causes mixed DayNight theme in fragments (new fragments use system dark, old fragments stay light) I have an Android app using AppCompat DayNight (Theme.MaterialComponents.DayNight.NoActionBar). Goal First run: app should follow OS theme (optional). After user manuall...
https://stackoverflow.com/questions/79896321/android-15-16-returning-from-browser-deeplink-causes-mixed-daynight-theme-in
android, kotlin, android-fragments, android-intent, themes
1,772,032,248
se_79896991
stackoverflow
MOBILE_DEVELOPMENT
Android Studio, implicit intent can not invoke a specific activity
Android Studio, implicit intent can not invoke a specific activity I want to invoke the ThirdActivity of my app ActivityTest by button of FirstActivity in the same app, with implicit intent with uri object, like the link https://www.google.com, but I can only open it with the built-in browser. my code of ThirdActivity...
https://stackoverflow.com/questions/79896991/android-studio-implicit-intent-can-not-invoke-a-specific-activity
android, kotlin, android-implicit-intent
1,772,107,061
se_77600748
stackoverflow
MOBILE_DEVELOPMENT
How to determine when a print job completes using the Zebra Android SDK
How to determine when a print job completes using the Zebra Android SDK I'm currently developing an application with the Zebra Android SDK and facing a challenge in determining when a print job has completed on a Zebra printer. I am using the latest version of the Zebra Android SDK. I attempted to use the sendAndWaitF...
https://stackoverflow.com/questions/77600748/how-to-determine-when-a-print-job-completes-using-the-zebra-android-sdk
java, android, kotlin, zebra-printers, zpl
1,701,704,582
se_28210188
stackoverflow
MOBILE_DEVELOPMENT
Static extension methods in Kotlin
Static extension methods in Kotlin How do you define a static extension method in Kotlin? Is this even possible? I currently have an extension method as shown below. public fun Uber.doMagic(context: Context) { // ... } The above extension can be invoked on an instance. uberInstance.doMagic(context) // Instance...
https://stackoverflow.com/questions/28210188/static-extension-methods-in-kotlin
static-methods, kotlin
1,422,520,524
se_77063689
stackoverflow
MOBILE_DEVELOPMENT
media3 mediaSessionService remove seekbar from notification
media3 mediaSessionService remove seekbar from notification Im using MediaSessionService to play streaming audio in the background. the notification shows but it has a seekbar which I want to remove. Disable or hide seekbar in MediaStyle notifications this post says to add putLong(MediaMetadata.METADATA_KEY_DURATION, ...
https://stackoverflow.com/questions/77063689/media3-mediasessionservice-remove-seekbar-from-notification
android, kotlin, exoplayer, android-media3
1,694,137,521
se_79136268
stackoverflow
MOBILE_DEVELOPMENT
android studio build could not move temporary workspace
android studio build could not move temporary workspace I'm trying to build my project in android studio, but it throws this error: Could not move temporary workspace (C:\Users\hp.gradle\caches\8.9\transforms\7a91ea941edcd7bffa2a6a13dc6831b0-6ed273f2-022e-4192-8436-9855986a2387) to immutable location (C:\Users\hp.gra...
https://stackoverflow.com/questions/79136268/android-studio-build-could-not-move-temporary-workspace
android, kotlin, gradle, transform
1,730,188,825
se_79896527
stackoverflow
MOBILE_DEVELOPMENT
Multiple upper bounds for a generic type parameter
Multiple upper bounds for a generic type parameter I have an interface and a class in kotlin. For example, interface A and class B. I want to write a function or a class with generics that will accept as generic all types that are subclasses of both A and B. How can I do this? When I write <T: A, B>, B is considered a...
https://stackoverflow.com/questions/79896527/multiple-upper-bounds-for-a-generic-type-parameter
kotlin, generics
1,772,052,626
se_79835601
stackoverflow
MOBILE_DEVELOPMENT
Suppress Kotlin&#39;s ExplicitBackingField warnings in Gradle
Suppress Kotlin&#39;s ExplicitBackingField warnings in Gradle I inserted ExplicitBackingFiel into Android multi-module project. And now we get a warnings from all sub-modules about this feature. w: ATTENTION! This build uses unsafe internal compiler arguments: -XXLanguage:+ExplicitBackingFields This mode is not reco...
https://stackoverflow.com/questions/79835601/suppress-kotlins-explicitbackingfield-warnings-in-gradle
kotlin, gradle
1,764,661,000
se_78084176
stackoverflow
MOBILE_DEVELOPMENT
How to set connect/read timeout in the Spring&#39;s `RestClient`?
How to set connect/read timeout in the Spring&#39;s `RestClient`? How to set a connect/read timeout in the Spring's RestClient? This client has been added in the Spring Framework 6.1.
https://stackoverflow.com/questions/78084176/how-to-set-connect-read-timeout-in-the-springs-restclient
java, spring, kotlin, client
1,709,239,503
se_45099688
stackoverflow
MOBILE_DEVELOPMENT
ERROR : error.NonExistentClass Kotlin In multi module Dagger project
ERROR : error.NonExistentClass Kotlin In multi module Dagger project I'm using Dagger 2 and Kotlin for Android development. My project is also a multi-module project. My settings.gradle file is like this: include :app include :lib I'm also maintaining the lib module. In the Dagger Files (for example in the compone...
https://stackoverflow.com/questions/45099688/error-error-nonexistentclass-kotlin-in-multi-module-dagger-project
android, kotlin, dagger-2, multi-module
1,500,025,294
se_73510422
stackoverflow
MOBILE_DEVELOPMENT
I&#39;m trying to run video by making a video player app with simplified controls, and having issue with findViewById
I&#39;m trying to run video by making a video player app with simplified controls, and having issue with findViewById The full error message I'm getting is this: Not enough information to infer type variable T import android.net.Uri import android.net.Uri.* import android.os.Bundle import android.widget.MediaControll...
https://stackoverflow.com/questions/73510422/im-trying-to-run-video-by-making-a-video-player-app-with-simplified-controls-a
android-studio, kotlin
1,661,598,093
se_79895255
stackoverflow
MOBILE_DEVELOPMENT
jOOQ Generating wrong types for custom datatype
jOOQ Generating wrong types for custom datatype In our postgreSQL schema we defined a custom datatype that combines two string fields. That custom datatype is stored as an array in one of our tables. As i am migrating to using the official jOOQ Code Generator plugin for gradle it fails to generate a proper Dao with ge...
https://stackoverflow.com/questions/79895255/jooq-generating-wrong-types-for-custom-datatype
kotlin, gradle, jooq, jooq-codegen
1,771,923,421
se_76027580
stackoverflow
MOBILE_DEVELOPMENT
Random Number Generator as Dice
Random Number Generator as Dice Ok I have a question about the Random Number Generator. However, let me explain I know how it works. So there is going to be minimal code. My question is what I call a floating index. This would be used as dice style generator. So I will explain the game example and then a piece of code...
https://stackoverflow.com/questions/76027580/random-number-generator-as-dice
kotlin, random
1,681,645,627
se_79894145
stackoverflow
MOBILE_DEVELOPMENT
Use zstd compression for a client with Ktor
Use zstd compression for a client with Ktor I'm creating an Android app with Kotlin and I'm using Ktor to transfer data between a client on one device and a server on another one. Ktor offers a plugin to decompress request bodies and to compress response bodies. Among the supported algorithms is Zstandard (zstd), whic...
https://stackoverflow.com/questions/79894145/use-zstd-compression-for-a-client-with-ktor
kotlin, compression, ktor
1,771,787,368
se_79116507
stackoverflow
MOBILE_DEVELOPMENT
JFXPanel doesn&#39;t get shown after dispose
JFXPanel doesn&#39;t get shown after dispose I convert a pane component in a composable ui by swing panel: package ui.pdfpreview import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import an...
https://stackoverflow.com/questions/79116507/jfxpanel-doesnt-get-shown-after-dispose
kotlin, javafx, desktop, kotlin-multiplatform, composable
1,729,661,915
se_79894245
stackoverflow
MOBILE_DEVELOPMENT
Why do I get an Unresolved error when I make an import in Kotlin wear?
Why do I get an Unresolved error when I make an import in Kotlin wear? I've forged a sample from github but some imports give me an error: Unresolved reference 'common'. It's these two import: import com.google.common.util.concurrent.Futures import com.google.common.util.concurrent.ListenableFuture What am I missin...
https://stackoverflow.com/questions/79894245/why-do-i-get-an-unresolved-error-when-i-make-an-import-in-kotlin-wear
kotlin, import
1,771,805,515
se_78756531
stackoverflow
MOBILE_DEVELOPMENT
kotlin - How to scroll a scrollable column inside a Jetpack Compose ModalBottomSheet?
kotlin - How to scroll a scrollable column inside a Jetpack Compose ModalBottomSheet? I am using Kotlin v1.7.20 and androidx.compose.material3 implementation v1.3.0-beta04. I need to fit a content into a bottom sheet. This content is so long, and its height exceeds the device's height that I am using to run the app. W...
https://stackoverflow.com/questions/78756531/kotlin-how-to-scroll-a-scrollable-column-inside-a-jetpack-compose-modalbottoms
android, kotlin, scroll, android-jetpack-compose, bottom-sheet
1,721,160,277
se_77996789
stackoverflow
MOBILE_DEVELOPMENT
How to access the cataloged libs of an android project within a kotlin extension for gradle files?
How to access the cataloged libs of an android project within a kotlin extension for gradle files? I have the following problem in my gradle files: Some parts of the code repeat the implementation of some libs a lot, for this, I will take Jetpack Compose as an example. In several gradle modules I have the following co...
https://stackoverflow.com/questions/77996789/how-to-access-the-cataloged-libs-of-an-android-project-within-a-kotlin-extension
android, kotlin, gradle, android-gradle-plugin, build.gradle
1,707,938,384
se_76888858
stackoverflow
MOBILE_DEVELOPMENT
Is it a good practice to declare plugins using id(&quot;org.company.myplugin&quot;) instead of alias(libs.plugins.myplugin) with version catalogs in Gradle?
Is it a good practice to declare plugins using id(&quot;org.company.myplugin&quot;) instead of alias(libs.plugins.myplugin) with version catalogs in Gradle? Gradle version catalogs is a new way to manage dependencies and plugins between different modules in a multi-module project. Based on the migration to version cat...
https://stackoverflow.com/questions/76888858/is-it-a-good-practice-to-declare-plugins-using-idorg-company-myplugin-instea
android, kotlin, gradle, android-gradle-plugin, build.gradle
1,691,836,360
se_60443412
stackoverflow
MOBILE_DEVELOPMENT
How to redirect internally in Ktor?
How to redirect internally in Ktor? I'm wondering if there's a way to do an internal redirect, re-route, or response forwarding inside Ktor. call.respondRedirect("relative/url") sends a HTTP 302 or 301 depending on the permantent: Boolean flag. I'm looking for something that would do the same without using HTTP, ju...
https://stackoverflow.com/questions/60443412/how-to-redirect-internally-in-ktor
kotlin, http-redirect, ktor, response.redirect
1,582,847,511
se_79892486
stackoverflow
MOBILE_DEVELOPMENT
How to prevent the virtual keyboard from getting stuck to the text field in Jetpack Compose?
How to prevent the virtual keyboard from getting stuck to the text field in Jetpack Compose? When I click on a text field, the keyboard appears. The problem is that it sticks directly to the text field, with no visible space between the two. I am using Jetpack Compose and would like there to always be some space betwe...
https://stackoverflow.com/questions/79892486/how-to-prevent-the-virtual-keyboard-from-getting-stuck-to-the-text-field-in-jetp
kotlin, android-jetpack-compose, android-jetpack, android-jetpack-compose-material3, android-compose-textfield
1,771,532,840
se_79893134
stackoverflow
MOBILE_DEVELOPMENT
Right align texts in Canvas using Jetpack Compose
Right align texts in Canvas using Jetpack Compose I want to draw a chart but I'm not able to right-align the Y axis labels: @Composable fun Chart( min: Double = 0.0, max: Double = 3823.0, ) { val textMeasurer = rememberTextMeasurer() val padding = 40f val yAxisLabelMaxWidth = textMeasurer.measure...
https://stackoverflow.com/questions/79893134/right-align-texts-in-canvas-using-jetpack-compose
android, kotlin, android-jetpack-compose, android-jetpack-compose-canvas
1,771,609,395
se_79887890
stackoverflow
MOBILE_DEVELOPMENT
GitLive Firebase Kotlin SDK: iOS crash with orderByKey() + startAt()/endAt()
GitLive Firebase Kotlin SDK: iOS crash with orderByKey() + startAt()/endAt() I'm using the GitLive Firebase Kotlin SDK (v2.4.0) in a Kotlin Multiplatform project. My code works perfectly on Android, but crashes on iOS when using orderByKey() combined with startAt() and endAt(). Error Message Terminating app due to un...
https://stackoverflow.com/questions/79887890/gitlive-firebase-kotlin-sdk-ios-crash-with-orderbykey-startat-endat
ios, kotlin, firebase-realtime-database, kotlin-multiplatform
1,770,875,901
se_79892965
stackoverflow
MOBILE_DEVELOPMENT
How to use Kotlin Symbol Processing (KSP) via CLI for symbol extraction? (KSP2 &amp; KSP1)
How to use Kotlin Symbol Processing (KSP) via CLI for symbol extraction? (KSP2 &amp; KSP1) I wanted to use Kotlin Symbol Processing (KSP) to retrieve symbols from my Kotlin source files. My setup is CLI-based. Currently, I am using Kotlin compiler 2.2.10 and KSP version 2.0.2. I first tried KSP2, which is the newer co...
https://stackoverflow.com/questions/79892965/how-to-use-kotlin-symbol-processing-ksp-via-cli-for-symbol-extraction-ksp2
kotlin, kotlin-symbol-processing
1,771,594,883
se_79892688
stackoverflow
MOBILE_DEVELOPMENT
Which jar to use when I want to use KSP from command line in Kotlin?
Which jar to use when I want to use KSP from command line in Kotlin? I wanted to use KSP via command line and found this documentation -- https://kotlinlang.org/docs/ksp-command-line.html I downloaded the the 'artifacts.zip' file here but when I opened I couldn't find any jar file related to ksp cmd line. Can someone ...
https://stackoverflow.com/questions/79892688/which-jar-to-use-when-i-want-to-use-ksp-from-command-line-in-kotlin
kotlin
1,771,566,791
se_67487698
stackoverflow
MOBILE_DEVELOPMENT
espresso how do you check if a dialog isn&#39;t visible
espresso how do you check if a dialog isn&#39;t visible I have a test that checks to see if a dialog is present or not. @Test fun dismissedWhenClicked() { //dimiss dialog onView(withText(R.string.simple)).inRoot(isDialog()).perform(click()) //check dialog onView(isRoot()).inRoot(isDialog()).check(match...
https://stackoverflow.com/questions/67487698/espresso-how-do-you-check-if-a-dialog-isnt-visible
android, kotlin, android-espresso
1,620,739,498
se_79848138
stackoverflow
MOBILE_DEVELOPMENT
How to fix &quot;Querying resource values using LocalContext.current&quot;?
How to fix &quot;Querying resource values using LocalContext.current&quot;? I have this in my composable: val context = LocalContext.current val credentialManager = CredentialManager.create(context) Button( onClick = { CoroutineScope(Dispatchers.IO).launch { try { val accounts =...
https://stackoverflow.com/questions/79848138/how-to-fix-querying-resource-values-using-localcontext-current
android, kotlin, android-jetpack-compose, android-context
1,765,850,296
se_68894585
stackoverflow
MOBILE_DEVELOPMENT
Expandable Text in Jetpack Compose
Expandable Text in Jetpack Compose so I am using a Text() composable like so: Text( text = "this is some sample text that is long and so it is ellipsized", maxLines = 1, overflow = TextOverflow.Ellipsis ) and it ellipsizes the text properly: The issue is that I want a See More tag at the end...
https://stackoverflow.com/questions/68894585/expandable-text-in-jetpack-compose
android, kotlin, android-jetpack-compose, android-jetpack-compose-text
1,629,729,504
se_79891790
stackoverflow
MOBILE_DEVELOPMENT
Sharing common State logic between different MVI Intent handlers
Sharing common State logic between different MVI Intent handlers While developing my Android app with the MVI architecture, I encountered a problem. I have screens that consistently use the same intents. For example, the UserScreen and Search Screen have their own classes that store intents. However, on some screens, ...
https://stackoverflow.com/questions/79891790/sharing-common-state-logic-between-different-mvi-intent-handlers
android, kotlin, android-jetpack-compose
1,771,442,784
se_78913425
stackoverflow
MOBILE_DEVELOPMENT
How to Handle Nested Square Roots and Expressions in a Scientific Calculator App?
How to Handle Nested Square Roots and Expressions in a Scientific Calculator App? I'm developing an Android app called "Scientific Calculator" with Jetpack Compose, and I've successfully implemented the square root operation for simple cases like √4 and √4*2. However, I'm facing difficulties with handling more complex...
https://stackoverflow.com/questions/78913425/how-to-handle-nested-square-roots-and-expressions-in-a-scientific-calculator-app
kotlin, math, android-jetpack-compose, viewmodel, calculator
1,724,660,062
se_79891817
stackoverflow
MOBILE_DEVELOPMENT
Kotlin removeAll function with MutableCollection receiver - both in/out modifiers are used
Kotlin removeAll function with MutableCollection receiver - both in/out modifiers are used In Kotlin, the removeAll extension function on MutableCollection with Iterable argument is defined as (see reference here): @IgnorableReturnValue fun <T> MutableCollection<in T>.removeAll( elements: Iterable<T> ): Boolean H...
https://stackoverflow.com/questions/79891817/kotlin-removeall-function-with-mutablecollection-receiver-both-in-out-modifier
kotlin, generics, covariance, mutable, contravariance
1,771,445,410
se_79889285
stackoverflow
MOBILE_DEVELOPMENT
&quot;Class &#39;kotlin.Unit&#39; was compiled with an incompatible version&quot; after adding a java class
&quot;Class &#39;kotlin.Unit&#39; was compiled with an incompatible version&quot; after adding a java class I use Android Studio 2024.1.2, java 1.8, kotlin 1.9.0, as written in the Studio settings windows. There is a kotlin project that has been successfully compiled until today, when I decided to add FCM notification...
https://stackoverflow.com/questions/79889285/class-kotlin-unit-was-compiled-with-an-incompatible-version-after-adding-a-j
android, kotlin, gradle
1,771,071,856
se_79890882
stackoverflow
MOBILE_DEVELOPMENT
Gow to fix java.lang.NoClassDefFoundError &gt; org/jetbrains/kotlin/gradle/plugin/KotlinCompilerPluginSupportPlugin?
Gow to fix java.lang.NoClassDefFoundError &gt; org/jetbrains/kotlin/gradle/plugin/KotlinCompilerPluginSupportPlugin? My gradle files cannot be executed successfully. On every Gradle sync I get the following error: java.lang.NoClassDefFoundError: org/jetbrains/kotlin/gradle/plugin/KotlinCompilerPluginSupportPlugin > o...
https://stackoverflow.com/questions/79890882/gow-to-fix-java-lang-noclassdeffounderror-org-jetbrains-kotlin-gradle-plugin-k
android, kotlin, gradle
1,771,332,602
se_79891477
stackoverflow
MOBILE_DEVELOPMENT
Accessing android wallpaper in Kotlin / Flutter application
Accessing android wallpaper in Kotlin / Flutter application I am working on a launcher on android 14 and would like to display the users background in my app. Lawnchair gets the wallpaper using WallpaperManager wallpaperManager = WallpaperManager.getInstance(getContext()); Drawable wallpaperDrawable = ...
https://stackoverflow.com/questions/79891477/accessing-android-wallpaper-in-kotlin-flutter-application
android, flutter, kotlin
1,771,412,551
se_79850546
stackoverflow
MOBILE_DEVELOPMENT
The &#39;org.jetbrains.kotlin.multiplatform&#39; plugin deprecated compatibility with Android Gradle plugin: &#39;com.android.application&#39;
The &#39;org.jetbrains.kotlin.multiplatform&#39; plugin deprecated compatibility with Android Gradle plugin: &#39;com.android.application&#39; I’m running a Compose Multiplatform project and encountering an unexpected warning at build time. Any insights would be appreciated. com.android.application The 'org.jetbrains...
https://stackoverflow.com/questions/79850546/the-org-jetbrains-kotlin-multiplatform-plugin-deprecated-compatibility-with-an
android, kotlin, kotlin-multiplatform
1,766,078,246
se_79890318
stackoverflow
MOBILE_DEVELOPMENT
Android Studio (Panda) refactor rename package breaks imports and project compilation in multi-module project with KSP/Hilt
Android Studio (Panda) refactor rename package breaks imports and project compilation in multi-module project with KSP/Hilt I am experiencing a very frustrating issue when renaming packages in a large multi-module Android project. Environment: Android Studio Panda 1 | 2025.3.1 Patch 1 Gradle 9.x Kotlin 2.x KSP Hi...
https://stackoverflow.com/questions/79890318/android-studio-panda-refactor-rename-package-breaks-imports-and-project-compil
kotlin, android-studio, refactoring, rename, automated-refactoring
1,771,256,587
se_41794914
stackoverflow
MOBILE_DEVELOPMENT
How to create a fat JAR with Gradle Kotlin script?
How to create a fat JAR with Gradle Kotlin script? As titled, I'd like to know how to modify the gradle.build.kts in order to have a task to create a unique jar with all the dependencies (kotlin lib included) inside. I found this sample in Groovy: //create a single Jar with all dependencies task fatJar(type: Jar) { ...
https://stackoverflow.com/questions/41794914/how-to-create-a-fat-jar-with-gradle-kotlin-script
kotlin, gradle, build.gradle, executable-jar, gradle-kotlin-dsl
1,485,111,369
se_73083499
stackoverflow
MOBILE_DEVELOPMENT
how to show Image Preview In ShareSheet in android while sharing both image and text In intent
how to show Image Preview In ShareSheet in android while sharing both image and text In intent currently in preview its showing text,but i want image to be shown in preview instead of text val bitmapUri = Uri.parse(path) val intent = Intent(Intent.ACTION_SEND_MULTIPLE) val share = Intent.createChooser(Intent...
https://stackoverflow.com/questions/73083499/how-to-show-image-preview-in-sharesheet-in-android-while-sharing-both-image-and
android, kotlin, android-intent, uri, share-intent
1,658,507,823
se_79890632
stackoverflow
MOBILE_DEVELOPMENT
How to recreate race condition with in a `callbackFlow`&#39;s `awaitClose` block?
How to recreate race condition with in a `callbackFlow`&#39;s `awaitClose` block? Background The crux of my issue is dealing with the behavior flatMapLatest has on flows where for every new value it receives it cancels its body to start computing with the new value that was emitted. This is the case even when the body...
https://stackoverflow.com/questions/79890632/how-to-recreate-race-condition-with-in-a-callbackflows-awaitclose-block
kotlin, kotlin-coroutines, kotlin-flow
1,771,309,893
se_73529595
stackoverflow
MOBILE_DEVELOPMENT
private lateinit var binding: ActivityMainBinding Not Working?
private lateinit var binding: ActivityMainBinding Not Working? class MainActivity : AppCompatActivity() { private lateinit var binding: ActivityMainBinding private lateinit var navController: NavController override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ...
https://stackoverflow.com/questions/73529595/private-lateinit-var-binding-activitymainbinding-not-working
java, android, android-studio, kotlin, gradle
1,661,779,804
se_78824874
stackoverflow
MOBILE_DEVELOPMENT
Variable number of generic parameters
Variable number of generic parameters I have a set of some parameters of different types. And I want to do some operation with them. But only if at least of one them is not null. My code is something like this: fun <A, B, C, R> atLeastOneNotNull(a: A?, b: B?, c: C?, block: (A?, B?, C?) -> R): R? { return if (atLea...
https://stackoverflow.com/questions/78824874/variable-number-of-generic-parameters
function, kotlin, variables, generics, block
1,722,592,602
se_79865297
stackoverflow
MOBILE_DEVELOPMENT
Accessing a lambda&#39;s parameter leads to &quot;Assignment type mismatch: actual type is &#39;Unit&#39;, but &#39;String&#39; was expected&quot;
Accessing a lambda&#39;s parameter leads to &quot;Assignment type mismatch: actual type is &#39;Unit&#39;, but &#39;String&#39; was expected&quot; I'm trying to pass a click handler to a child function that sends a string back to the parent and updates a mutable value based on the string. I'm getting an error on the f...
https://stackoverflow.com/questions/79865297/accessing-a-lambdas-parameter-leads-to-assignment-type-mismatch-actual-type-i
android, kotlin, lambda, android-jetpack-compose, anonymous-function
1,768,100,161
se_79890377
stackoverflow
MOBILE_DEVELOPMENT
How to change the ModalNavigationDrawer in Android TV using Jetpack Compose?
How to change the ModalNavigationDrawer in Android TV using Jetpack Compose? i have build a Android TV app using jetpack Compose, now i have some problem with the ModalNavigationDrawer my own is to wide when the drawer is expand this my code class TVHomeActivity : ComponentActivity() { var secureStorage: FlutterS...
https://stackoverflow.com/questions/79890377/how-to-change-the-modalnavigationdrawer-in-android-tv-using-jetpack-compose
android, kotlin, android-jetpack-compose, android-tv
1,771,263,676
se_79420184
stackoverflow
MOBILE_DEVELOPMENT
How to avoid unnecessary recompositions due to checking a state variable?
How to avoid unnecessary recompositions due to checking a state variable? I'm adding a lot of markers on a Google Map in Jetpack Compose, and it works, but I need to paint them only when zoom level is above 15, so I added if (cameraPositionState.position.zoom > 15) before adding the markers. It works also, but it work...
https://stackoverflow.com/questions/79420184/how-to-avoid-unnecessary-recompositions-due-to-checking-a-state-variable
android, kotlin, android-jetpack-compose, android-maps, compose-recomposition
1,738,916,466
se_79613595
stackoverflow
MOBILE_DEVELOPMENT
Cannot move TextView that is constraint to RecyclerView when RecyclerView items are disappearing
Cannot move TextView that is constraint to RecyclerView when RecyclerView items are disappearing I have 2 recycler views and one text view. What I am trying to do is when I click from top recyclerview (recyclerViewNotClickedItems) the items, they will disappear and they will appear in the bottom recyclerview (recycler...
https://stackoverflow.com/questions/79613595/cannot-move-textview-that-is-constraint-to-recyclerview-when-recyclerview-items
android, xml, kotlin, android-recyclerview
1,746,772,664
se_79881856
stackoverflow
MOBILE_DEVELOPMENT
Kotlin dependency upgrade group io.mockk artifact mockk-jvm upgrade from 1.14.7 to 1.14.9 gives &quot;Unresolved reference &#39;mockk&#39;.&quot;
Kotlin dependency upgrade group io.mockk artifact mockk-jvm upgrade from 1.14.7 to 1.14.9 gives &quot;Unresolved reference &#39;mockk&#39;.&quot; I am using Spring Boot with Kotlin. I am upgrading the following dependency from 1.14.7 to 1.14.9. <dependency> <groupId>io.mockk</groupId> <artifactId>mockk-jvm</artifa...
https://stackoverflow.com/questions/79881856/kotlin-dependency-upgrade-group-io-mockk-artifact-mockk-jvm-upgrade-from-1-14-7
kotlin
1,770,117,881
se_48951674
stackoverflow
MOBILE_DEVELOPMENT
Android - Custom annotation TargetFlavor like TargetApi but for flavors
Android - Custom annotation TargetFlavor like TargetApi but for flavors I'm currently working to create a custom annotation which does the same work as @TargetApi() but with my flavors. The Case In my case, I need to use a certain method (in a class called Navigator) to redirect my application to another screen but ...
https://stackoverflow.com/questions/48951674/android-custom-annotation-targetflavor-like-targetapi-but-for-flavors
java, android, gradle, annotations, kotlin
1,519,401,178