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_77865390 | stackoverflow | MOBILE_DEVELOPMENT | Facing issue on changing App Language in Android 13 & 14 | Facing issue on changing App Language in Android 13 & 14
I set my android app local via
fun setSystemLocale(context: Context): Context {
val locale = getCurrentLanguage().locale
Locale.setDefault(locale)
val configuration = Configuration(context.resources.configuration)
configuratio... | https://stackoverflow.com/questions/77865390/facing-issue-on-changing-app-language-in-android-13-14 | android, kotlin, android-studio, android-13, android-14 | 1,706,003,967 |
se_79788721 | stackoverflow | MOBILE_DEVELOPMENT | Android Waiting for Target Device to Come Online in IntelliJ and Android Studio | Android Waiting for Target Device to Come Online in IntelliJ and Android Studio
PROBLEM
Hi, I'm getting an endless loop of "Waiting for all target devices to come online", or the emulator just shows the Android intro but never loads.
The JVM version of the program runs fine with my program, but not the Android emulato... | https://stackoverflow.com/questions/79788721/android-waiting-for-target-device-to-come-online-in-intellij-and-android-studio | android, kotlin, android-studio, intellij-idea, kotlin-multiplatform | 1,760,294,717 |
se_77622788 | stackoverflow | MOBILE_DEVELOPMENT | Error "Could not create task ':app:kspDebugKotlin'" after adding ksp | Error "Could not create task ':app:kspDebugKotlin'" after adding ksp
I'm trying to use android room in a kotlin project, so I added ksp in the settings, but now I am getting the following error in build:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not create... | https://stackoverflow.com/questions/77622788/error-could-not-create-task-appkspdebugkotlin-after-adding-ksp | android, kotlin | 1,701,978,985 |
se_79783211 | stackoverflow | MOBILE_DEVELOPMENT | Kotlin arrow optics ksp plugin inside KMP project | Kotlin arrow optics ksp plugin inside KMP project
Im trying to get the ksp plugin for arrow optics up and running in a KMP project.
I stared by only including the ksp plugin in the Android build file:
plugins {
// ...
alias(libs.plugins.ksp)
}
// ...
kotlin {
// ...
sourceSets {
androidMain... | https://stackoverflow.com/questions/79783211/kotlin-arrow-optics-ksp-plugin-inside-kmp-project | android, kotlin, gradle, kmp, ksp | 1,759,698,689 |
se_76892423 | stackoverflow | MOBILE_DEVELOPMENT | Difference between Color.Transparent and Color.Unspecified | Difference between Color.Transparent and Color.Unspecified
What's the difference between Color.Transparent and Color.Unspecified in Jetpack Compose? Is one of them better for performance than the other? Which of these should be used if I don't want to see any background colour on my component at all?
OutlinedCard(colo... | https://stackoverflow.com/questions/76892423/difference-between-color-transparent-and-color-unspecified | android, kotlin, android-jetpack-compose | 1,691,913,111 |
se_79807353 | stackoverflow | MOBILE_DEVELOPMENT | Run .main.kts script with DependsOn from command line using kotlin runner fails to resolve | Run .main.kts script with DependsOn from command line using kotlin runner fails to resolve
Running .main.kts file directly in IntelliJ IDEA works fine, but when I try to run it via Kotlin Runner I get an error of unresolved symbols.
@file:Repository("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
@fil... | https://stackoverflow.com/questions/79807353/run-main-kts-script-with-dependson-from-command-line-using-kotlin-runner-fails | kotlin, kotlin-script | 1,762,115,009 |
se_74704038 | stackoverflow | MOBILE_DEVELOPMENT | Kotlin Flow only collect every second | Kotlin Flow only collect every second
I have a Flow which downloads a file. The flow emits the download progress. I want to show the progress in the phone notification center, but only update the value once every second to prevent lagging the device.
My Flow:
return callbackFlow {
someJavaCallback { progress ->
... | https://stackoverflow.com/questions/74704038/kotlin-flow-only-collect-every-second | kotlin, coroutine, kotlin-flow | 1,670,336,226 |
se_79806352 | stackoverflow | MOBILE_DEVELOPMENT | How do I implement custom scene navigation animations in Compose Navigation 3? | How do I implement custom scene navigation animations in Compose Navigation 3?
I'm using the TwoPaneSceneStrategy as available on Google's Nav3 Recipes repo to display the content in a NavDisplay. This is the Scene that actually displays the content:
class TwoPaneScene<T : Any>(
override val key: Any,
override... | https://stackoverflow.com/questions/79806352/how-do-i-implement-custom-scene-navigation-animations-in-compose-navigation-3 | android, kotlin, android-jetpack-compose | 1,761,976,488 |
se_75315559 | stackoverflow | MOBILE_DEVELOPMENT | How to get the ImageView of captured image bitmap from a CameraController to fill the whole parent view? | How to get the ImageView of captured image bitmap from a CameraController to fill the whole parent view?
I've been stuck with a seemingly simple task: After taking a picture, display this picture in the full ViewPort of the CameraPreview.
Answers in related questions did not solve my problem (as I explain further belo... | https://stackoverflow.com/questions/75315559/how-to-get-the-imageview-of-captured-image-bitmap-from-a-cameracontroller-to-fil | android, kotlin, androidx, android-camerax | 1,675,281,564 |
se_79804993 | stackoverflow | MOBILE_DEVELOPMENT | Unexpected behavior when replacing arrow-kt partiallyN function with kotlin lambda | Unexpected behavior when replacing arrow-kt partiallyN function with kotlin lambda
I'm working on updating some Kotlin code that depends on arrow-kt. As part of the migration process from arrow 1.2 to 2.x, I need to get rid of arrow partiallyN() functions and replace them with native Kotlin lambdas.
The functions I am... | https://stackoverflow.com/questions/79804993/unexpected-behavior-when-replacing-arrow-kt-partiallyn-function-with-kotlin-lamb | kotlin, lambda, arrow-kt | 1,761,841,324 |
se_79326821 | stackoverflow | MOBILE_DEVELOPMENT | Trouble sharing schemas between schemas when converting from avdl to avsc | Trouble sharing schemas between schemas when converting from avdl to avsc
We have a big avro model currently written using IDL (avdl). We create a shared.avdl file with shared records, and then we're using import idl functionality to import the records into other records. We are converting the file to an avsc file, an... | https://stackoverflow.com/questions/79326821/trouble-sharing-schemas-between-schemas-when-converting-from-avdl-to-avsc | java, kotlin, gradle, avro, avsc | 1,735,915,542 |
se_79804945 | stackoverflow | MOBILE_DEVELOPMENT | how to add custom environment variables to use in build.gradle in Androidd Studio | how to add custom environment variables to use in build.gradle in Androidd Studio
I have build.gradle setup with signingConfigs as below:
SystemConfig90 {
storeFile file(System.getenv("KEYSTORE_PATH_90"))
//storeFile file('/Users/bhaskarrajaryal/AndroidStudioProjects/ATS/Keystore/90.keystore')... | https://stackoverflow.com/questions/79804945/how-to-add-custom-environment-variables-to-use-in-build-gradle-in-androidd-studi | kotlin, android-studio, environment-variables, build.gradle, android-dialog | 1,761,838,798 |
se_76095700 | stackoverflow | MOBILE_DEVELOPMENT | Kotlin UShort deserialization with jackson | Kotlin UShort deserialization with jackson
I am trying to see how to go about inline types such as UShort, UInt in Kotlin and their deserialization using jackson.
build.gradle.kts
plugins {
kotlin("jvm") version "1.8.10"
kotlin("plugin.serialization") version "1.8.10"
}
group = "pl.demo"
java.sourceCompatibil... | https://stackoverflow.com/questions/76095700/kotlin-ushort-deserialization-with-jackson | kotlin, jackson-databind, kotlinx.serialization, ushort | 1,682,366,837 |
se_79804083 | stackoverflow | MOBILE_DEVELOPMENT | Unwrapping an arrow-kt Option in an extension function | Unwrapping an arrow-kt Option in an extension function
I'm in the process of migrating some utility projects our team uses from Arrow 1.2 to 2.x . One of the functions that needs to be updated is an extension function for converting a String into a Date. The existing code looks like this:
abstract fun parser(date: Str... | https://stackoverflow.com/questions/79804083/unwrapping-an-arrow-kt-option-in-an-extension-function | kotlin, extension-methods, arrow-kt | 1,761,759,605 |
se_79801864 | stackoverflow | MOBILE_DEVELOPMENT | Waiting for coroutine to end it's job to trigger an event | Waiting for coroutine to end it's job to trigger an event
I have an Activity that is responsible for creating a new entry in the database. In this activity, a button launches a coroutine to do all the database-related stuff, and when it's done, navigate to another Activity where you overview your vault.
Today is m... | https://stackoverflow.com/questions/79801864/waiting-for-coroutine-to-end-its-job-to-trigger-an-event | android, kotlin, asynchronous, android-room, kotlin-coroutines | 1,761,571,532 |
se_79787426 | stackoverflow | MOBILE_DEVELOPMENT | Kotlin compilation errors with expo-modules-core and react-native-gesture-handler | Kotlin compilation errors with expo-modules-core and react-native-gesture-handler
I'm getting Kotlin compilation errors when building with Expo SDK 54 and React Native 0.76.5.
Environment:
Expo SDK: 54.0.13
React Native: 0.76.5
EAS Build / GitHub Actions (ubuntu-latest)
Node: 20
Errors:
expo-modules-core compilatio... | https://stackoverflow.com/questions/79787426/kotlin-compilation-errors-with-expo-modules-core-and-react-native-gesture-handle | react-native, kotlin, expo | 1,760,104,908 |
se_79785945 | stackoverflow | MOBILE_DEVELOPMENT | Why does my project fail to build after updating to Flutter's latest version? | Why does my project fail to build after updating to Flutter's latest version?
I made some fixes, committed the changes and everything worked. I wanted to update the project to the newest version of Flutter and dependencies but now even if I discard all changes I still can't run it because of errors. Is the only op... | https://stackoverflow.com/questions/79785945/why-does-my-project-fail-to-build-after-updating-to-flutters-latest-version | flutter, kotlin, dart, gradle | 1,759,969,249 |
se_79800002 | stackoverflow | MOBILE_DEVELOPMENT | Android Gemini AI SDK (firebase-vertexai-ktx) fails with 404 Not Found (v1beta endpoint) despite latest library version | Android Gemini AI SDK (firebase-vertexai-ktx) fails with 404 Not Found (v1beta endpoint) despite latest library version
I'm developing an Android app using Kotlin and Jetpack Compose. I'm trying to integrate Gemini AI to analyze images uploaded by the user using the Firebase Vertex AI SDK (com.google.firebase:firebase... | https://stackoverflow.com/questions/79800002/android-gemini-ai-sdk-firebase-vertexai-ktx-fails-with-404-not-found-v1beta-e | firebase, kotlin, google-cloud-vertex-ai, firebase-ai-logic | 1,761,476,929 |
se_79799966 | stackoverflow | MOBILE_DEVELOPMENT | Mongock rollback method is not executed | Mongock rollback method is not executed
I have a collection migrationTest in MongoDB with a unique index for the message field.
In my migration I'm inserting documents to this collection and in one place I'm using the existing message to simulate error.
The Exception is thrown on migration as expected, but rollback() ... | https://stackoverflow.com/questions/79799966/mongock-rollback-method-is-not-executed | mongodb, spring-boot, kotlin, mongock | 1,761,472,626 |
se_77508484 | stackoverflow | MOBILE_DEVELOPMENT | Foreground Service Scheduling Issue: AlarmManager Fails to start Foreground Service When App is Not in the Background | Foreground Service Scheduling Issue: AlarmManager Fails to start Foreground Service When App is Not in the Background
I'm encountering an issue with scheduling a foreground service using AlarmManager in my Android application. Despite setting up the code to trigger a foreground service at specific times using alarms, ... | https://stackoverflow.com/questions/77508484/foreground-service-scheduling-issue-alarmmanager-fails-to-start-foreground-serv | java, android, kotlin, android-service, alarmmanager | 1,700,337,085 |
se_79799204 | stackoverflow | MOBILE_DEVELOPMENT | Argument type mismatch: actual type is 'SuspendFunction1<String, Function0<Int>>', but 'SuspendFunction0<Function0<Int>>' was expected | Argument type mismatch: actual type is 'SuspendFunction1<String, Function0<Int>>', but 'SuspendFunction0<Function0<Int>>' was expected
For example I have the following code (see for example at https://pl.kotl.in/-1hmKnK8i):
val a = suspend {b: String -> {0}}
On this code I then... | https://stackoverflow.com/questions/79799204/argument-type-mismatch-actual-type-is-suspendfunction1string-function0int | kotlin, suspend | 1,761,344,232 |
se_76035190 | stackoverflow | MOBILE_DEVELOPMENT | Using fonts in a Compose Multiplatform project | Using fonts in a Compose Multiplatform project
I am looking for a way to easily use custom fonts in a Compose Multiplatform project.
I found that we need to use Font from the androidx.compose.ui.text.platform.Font package. But this object takes in parameter data: ByteArray.
Until now, I haven't found a way to use Font... | https://stackoverflow.com/questions/76035190/using-fonts-in-a-compose-multiplatform-project | kotlin, kotlin-multiplatform, compose-multiplatform | 1,681,734,711 |
se_79797208 | stackoverflow | MOBILE_DEVELOPMENT | Why onReceive event will not fire in BroadcastReceiver in Android Kotlin, when sending and receiving sms on the same device or phone? | Why onReceive event will not fire in BroadcastReceiver in Android Kotlin, when sending and receiving sms on the same device or phone?
Android Studio Narwhal 4 Feature Drop | 2025.1.4
Build #AI-251.27812.49.2514.14217341, built on October 6, 2025
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Kotlin plugin: K2 mode
G... | https://stackoverflow.com/questions/79797208/why-onreceive-event-will-not-fire-in-broadcastreceiver-in-android-kotlin-when-s | android, kotlin, broadcastreceiver, sms | 1,761,164,710 |
se_79798890 | stackoverflow | MOBILE_DEVELOPMENT | Jetpack compose Canvas perspective model | Jetpack compose Canvas perspective model
If I have a simple drawing like:
Box(
modifier = Modifier
.size(coinRadius * 2)
.graphicsLayer {
cameraDistance = 12f * density
rotationY = rotation.value
}
.clip(CircleShape)
.background(Color(0x90202020)),
)
}
Is the projection mode... | https://stackoverflow.com/questions/79798890/jetpack-compose-canvas-perspective-model | kotlin, android-jetpack-compose, android-jetpack-compose-canvas | 1,761,317,379 |
se_77311400 | stackoverflow | MOBILE_DEVELOPMENT | why i getting a error "Unresolved reference: fillMaxSize" with modifier = Modifier.fillMaxSize? | why i getting a error "Unresolved reference: fillMaxSize" with modifier = Modifier.fillMaxSize?
i am trying to use the jetpack compose but it giving so much errors, one of them is that -
package com.example.imagecardcompose
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.... | https://stackoverflow.com/questions/77311400/why-i-getting-a-error-unresolved-reference-fillmaxsize-with-modifier-modifi | kotlin, android-jetpack-compose, android-design-library, android-jetpack-compose-material3 | 1,697,567,133 |
se_79800068 | stackoverflow | MOBILE_DEVELOPMENT | Why Companion device pairing is not able to detect my device? | Why Companion device pairing is not able to detect my device?
I am trying to integrate Companion device pairing to pair my bluetooth device with other device, One of my device is using Android 15 whereas the other one is using Android 16. I have enabled location service. Here is my code
class MainActivity : AppCompatA... | https://stackoverflow.com/questions/79800068/why-companion-device-pairing-is-not-able-to-detect-my-device | android, kotlin, bluetooth, android-companion-device | 1,761,484,460 |
se_60361376 | stackoverflow | MOBILE_DEVELOPMENT | How to save bitmap to Storage in KOTLIN (Media.insertImage ==> insertImage is deprecated in Java, also Media.DATA ==> DATA is deprecated in Java) | How to save bitmap to Storage in KOTLIN (Media.insertImage ==> insertImage is deprecated in Java, also Media.DATA ==> DATA is deprecated in Java)
In KOTLIN, all alternatives have been tested but a bitmap image could not be saved to an External Storage
If I use:
MediaStore.Images.Media.insertImage(this.contentR... | https://stackoverflow.com/questions/60361376/how-to-save-bitmap-to-storage-in-kotlin-media-insertimage-insertimage-is-de | android, kotlin, mediastore, android-external-storage | 1,582,454,703 |
se_79624836 | stackoverflow | MOBILE_DEVELOPMENT | How to resolve kotlin version conflict in Flutter project | How to resolve kotlin version conflict in Flutter project
My project was working fine until I upgraded my flutter version to Flutter 3.29.3 • channel stable and updated some packages to match with the new version. After that, so many packages such as pdf_render, workmanager, etc stopped working. I always got this erro... | https://stackoverflow.com/questions/79624836/how-to-resolve-kotlin-version-conflict-in-flutter-project | kotlin, version, conflict | 1,747,386,140 |
se_79797054 | stackoverflow | MOBILE_DEVELOPMENT | Shared element keeps going back to the top left grid square when using a container transform with shared element transitions | Shared element keeps going back to the top left grid square when using a container transform with shared element transitions
I'm working on a trivia game and I want the grid squares to go larger to show the full trivia question and buttons. I'm using a container transform and that works just fine except for one thing.... | https://stackoverflow.com/questions/79797054/shared-element-keeps-going-back-to-the-top-left-grid-square-when-using-a-contain | android, kotlin, android-jetpack-compose, android-animation | 1,761,151,766 |
se_70146385 | stackoverflow | MOBILE_DEVELOPMENT | Preview a "screen" in android jetpack compose navigation with a PreviewParameter NavController | Preview a "screen" in android jetpack compose navigation with a PreviewParameter NavController
I am discovering android Jetpack Compose (and Navigation) and try to display a preview of a view with a navController as parameter.
To achieve this, I use the PreviewParameter and I have no error, but nothing is di... | https://stackoverflow.com/questions/70146385/preview-a-screen-in-android-jetpack-compose-navigation-with-a-previewparameter | kotlin, android-jetpack-compose, android-jetpack-navigation | 1,638,124,792 |
se_78237939 | stackoverflow | MOBILE_DEVELOPMENT | Change app theme programmatically Android Studio using Kotlin | Change app theme programmatically Android Studio using Kotlin
I'm making an Android application using Kotlin. It contains App Theme color list so the user can select one color from it, and then I save this color in Shared Preferences.
I've done with all Shared Preferences and XML values stuff, and I've succeeded to ch... | https://stackoverflow.com/questions/78237939/change-app-theme-programmatically-android-studio-using-kotlin | android, kotlin, android-theme | 1,711,626,234 |
se_77028590 | stackoverflow | MOBILE_DEVELOPMENT | How to find the sum of two PaddingValues in Android Compose? | How to find the sum of two PaddingValues in Android Compose?
Suppose I have a PaddingValues A and PaddingValues B. How to find their sum?
I found no method in Android Compose which sum up two PaddingValues. And getting the values of each side padding is more complicated. Because it requires LayoutDirection for Horizon... | https://stackoverflow.com/questions/77028590/how-to-find-the-sum-of-two-paddingvalues-in-android-compose | android, kotlin, android-jetpack-compose | 1,693,663,270 |
se_58968267 | stackoverflow | MOBILE_DEVELOPMENT | Check if column NULL or empty in Room DB | Check if column NULL or empty in Room DB
I want to get a list of MyModel whose deletedAt value is NULL.
Here is my table:
@Entity(tableName = "my_table")
data class MyModel(
@PrimaryKey
@ColumnInfo(name = "id")
var id: String,
@ColumnInfo(name = "deletedAt")
var deletedAt: Date? = null
)
Dao:
@... | https://stackoverflow.com/questions/58968267/check-if-column-null-or-empty-in-room-db | android, kotlin, android-room | 1,574,316,245 |
se_65155759 | stackoverflow | MOBILE_DEVELOPMENT | firebase cloud messaging push notification | firebase cloud messaging push notification
I am using firebase cloud messaging for push notification
when I publish my notification using python and firebase cloud messaging panel notification doesn't appear in notification bar
what things I need to add to my project | https://stackoverflow.com/questions/65155759/firebase-cloud-messaging-push-notification | python, android, kotlin, firebase-cloud-messaging | 1,607,162,476 |
se_79798983 | stackoverflow | MOBILE_DEVELOPMENT | New list in Compose doesn't refresh the UI | New list in Compose doesn't refresh the UI
I'm working with Compose and the ViewModel and a list. I don't understand why my UI isn't recomposing when I click on the button, although I am generating a new list.
data class Dice(var value: Int = 6) {
fun roll() {
value = Random.nextInt(6) + 1
}
}
cla... | https://stackoverflow.com/questions/79798983/new-list-in-compose-doesnt-refresh-the-ui | android, kotlin, android-jetpack-compose | 1,761,323,636 |
se_72275394 | stackoverflow | MOBILE_DEVELOPMENT | Jetbrains Exposed support for Common Table Expressions | Jetbrains Exposed support for Common Table Expressions
I have two tables where second table is referenced as foreign key in first table and I'm using jetbrains exposed as ORM framework for my Kotlin code.
Table A
id | type | tableb_id
1 | abcd | 2
2 | abcd | 3
Table B
id | date | time
1 | 2022-12-12 | 2022... | https://stackoverflow.com/questions/72275394/jetbrains-exposed-support-for-common-table-expressions | kotlin, kotlin-exposed | 1,652,795,980 |
se_70923243 | stackoverflow | MOBILE_DEVELOPMENT | How to adjust tabRow indicator width according to the text above it? | How to adjust tabRow indicator width according to the text above it?
i want to adjust tabrow's indicator width according to text above like this.
But I don't know how to manipulate the width of the indicator in a generic way.
Intended:
My Code:
TabRow(
// Our selected tab is our current page
... | https://stackoverflow.com/questions/70923243/how-to-adjust-tabrow-indicator-width-according-to-the-text-above-it | android, kotlin, android-jetpack-compose, jetpack-compose-accompanist | 1,643,618,928 |
se_55961562 | stackoverflow | MOBILE_DEVELOPMENT | How can I add a footer to the docs? | How can I add a footer to the docs?
I am looking for a way to include text in the footer of all Dokka generated docs. I am not seeing this option being advertised by the Gradle or Maven plugins for Dokka.
Is this possible? Can you point me to a sample? | https://stackoverflow.com/questions/55961562/how-can-i-add-a-footer-to-the-docs | kotlin, footer, kotlin-dokka | 1,556,840,641 |
se_75527297 | stackoverflow | MOBILE_DEVELOPMENT | How to parse a BIG JSON (45MB) with kotlinx.serialization recursively/incrementally | How to parse a BIG JSON (45MB) with kotlinx.serialization recursively/incrementally
I'm doing an app for Android that has to parse very big JSON files. The problem is that parsing the hole JSON file at once takes a lot of RAM memory usage and I don't want that (OutOfMemoryError "Failed to allocate a 92164736 byte allo... | https://stackoverflow.com/questions/75527297/how-to-parse-a-big-json-45mb-with-kotlinx-serialization-recursively-incrementa | android, json, kotlin, deserialization | 1,677,026,936 |
se_76929515 | stackoverflow | MOBILE_DEVELOPMENT | Why should viewModel() only be used at the root composable and the instance never passed? | Why should viewModel() only be used at the root composable and the instance never passed?
This documentation about using ViewModel with Compose states:
Note: Due to their lifecycle and scoping, you should access and call ViewModel instances at screen-level composables, that is, close to a root composable called from ... | https://stackoverflow.com/questions/76929515/why-should-viewmodel-only-be-used-at-the-root-composable-and-the-instance-neve | android, kotlin, android-jetpack-compose | 1,692,363,228 |
se_77743603 | stackoverflow | MOBILE_DEVELOPMENT | How to preview an Android Glance App Widget in Android Studio? | How to preview an Android Glance App Widget in Android Studio?
I am following the Android Glance documentation (https://developer.android.com/jetpack/compose/glance/create-app-widget) to create a widget. The widget UI is defined in composable function called MyContent.
I try to preview the UI by adding a composable pr... | https://stackoverflow.com/questions/77743603/how-to-preview-an-android-glance-app-widget-in-android-studio | android, kotlin, android-jetpack-compose, glance-appwidget, glance | 1,704,150,547 |
se_79797501 | stackoverflow | MOBILE_DEVELOPMENT | Virtual Phone in Android Studio in loop showing Starting Up… | Virtual Phone in Android Studio in loop showing Starting Up…
At the moment, I am trying to get a virtual phone (Pixel 7) running in Android Studio. I already tried the following things, to optimize/ enable the bootup:
deactivated VBS
activated VirtualMachinePlatform
reinstalled adb
deleted virtual phone and created a... | https://stackoverflow.com/questions/79797501/virtual-phone-in-android-studio-in-loop-showing-starting-up | android, kotlin, debugging, android-jetpack-compose | 1,761,203,537 |
se_79798069 | stackoverflow | MOBILE_DEVELOPMENT | Unresolved reference: FirebaseMessagingService even after adding firebase-messaging dependency in Flutter Android module | Unresolved reference: FirebaseMessagingService even after adding firebase-messaging dependency in Flutter Android module
I have an app that I want to add Firebase Cloud Messaging. Now, when configuring the services, I am getting this error in my Kotlin file:
Cannot resolve symbol 'FirebaseMessagingService'
When I tr... | https://stackoverflow.com/questions/79798069/unresolved-reference-firebasemessagingservice-even-after-adding-firebase-messag | android, flutter, firebase, kotlin, firebase-cloud-messaging | 1,761,242,775 |
se_66673752 | stackoverflow | MOBILE_DEVELOPMENT | Problem receiving Intents with Zebra Data wedge API | Problem receiving Intents with Zebra Data wedge API
We are currently using a zebra device for company asset management so we are developing a small prototype android app to scan RFID tags. I've read from the data wedge API that the app can get scanned output has an intent broadcast.
But the app is unable to receive an... | https://stackoverflow.com/questions/66673752/problem-receiving-intents-with-zebra-data-wedge-api | android, kotlin, barcode-scanner, rfid, datawedge | 1,615,986,570 |
se_79797956 | stackoverflow | MOBILE_DEVELOPMENT | Using Clerk in Kotlin Multiplatform (KMP) | Using Clerk in Kotlin Multiplatform (KMP)
I'm trying to implement Clerk authentication in my Android Kotlin Multiplatform project following the official Clerk Android Quickstart Guide, but the SDK artifact referenced in the documentation doesn't appear to exist in any Maven repository.
What I'm trying to do:
Add the C... | https://stackoverflow.com/questions/79797956/using-clerk-in-kotlin-multiplatform-kmp | java, kotlin, clerk, kmp | 1,761,232,151 |
se_79797895 | stackoverflow | MOBILE_DEVELOPMENT | Dependency conflict when upgrading arrow-kt to 1.2.4 | Dependency conflict when upgrading arrow-kt to 1.2.4
I'm currently working on upgrading dependencies for a kotlin project that uses arrow kt. One of the libraries we use is arrow-fx-coroutines. After upgrading to the most recent 1.x version (1.2.4) I am seeing some dependency conflicts. After looking into the dependen... | https://stackoverflow.com/questions/79797895/dependency-conflict-when-upgrading-arrow-kt-to-1-2-4 | kotlin, maven, dependency-management, arrow-kt | 1,761,228,151 |
se_79792770 | stackoverflow | MOBILE_DEVELOPMENT | Android Studio automatically rewrites Kotlin code when copying a file | Android Studio automatically rewrites Kotlin code when copying a file
When I copy a .kt file from one project to another (or within the same project) in Android Studio Narwhal 3 Feature Drop | 2025.1.3, the IDE automatically modifies parts of my Kotlin code.
Example:
Original:
val filtered = map.filter { it.key !in li... | https://stackoverflow.com/questions/79792770/android-studio-automatically-rewrites-kotlin-code-when-copying-a-file | kotlin, intellij-idea, refactoring | 1,760,679,581 |
se_79793702 | stackoverflow | MOBILE_DEVELOPMENT | Play Console warning: “Library that does not support 16 KB: base/lib/x86_64/libtensorflowlite_jni.so” when uploading AAB with TensorFlow Lite | Play Console warning: “Library that does not support 16 KB: base/lib/x86_64/libtensorflowlite_jni.so” when uploading AAB with TensorFlow Lite
I’m uploading my Android App Bundle (AAB) to Google Play Console and getting this warning:
Library that does not support 16 KB:
base/lib/x86_64/libtensorflowlite_jni.so after u... | https://stackoverflow.com/questions/79793702/play-console-warning-library-that-does-not-support-16-kb-base-lib-x86-64-libt | android, kotlin, tensorflow, tensorflow-lite | 1,760,782,628 |
se_79797559 | stackoverflow | MOBILE_DEVELOPMENT | TaskExecutionException in building Desktop KMP application with KCEF for WebViewKMP in future | TaskExecutionException in building Desktop KMP application with KCEF for WebViewKMP in future
I do it like this in main.kt:
val bundleLocation = System.getProperty("compose.application.resources.dir")?.let { File(it) } ?: File(".")
LaunchedEffect(Unit) {
try {
withContext(Dispatchers.IO) {
... | https://stackoverflow.com/questions/79797559/taskexecutionexception-in-building-desktop-kmp-application-with-kcef-for-webview | android, kotlin, webview, chromium-embedded, kmp | 1,761,207,392 |
se_57795263 | stackoverflow | MOBILE_DEVELOPMENT | "Test events were not received" when running tests using IntelliJ | "Test events were not received" when running tests using IntelliJ
I have a Kotlin project and when I run my JUnit tests, I can't see tests execution result in IntelliJ and get this message instead:
Test events were not received
I'm using this setup:
macOS Mojave
Intellij CE 2019.2
JDK 11.0.3
Kotlin 1.3.... | https://stackoverflow.com/questions/57795263/test-events-were-not-received-when-running-tests-using-intellij | kotlin, gradle, testing, intellij-idea, junit | 1,567,628,924 |
se_79796913 | stackoverflow | MOBILE_DEVELOPMENT | Android 16 with appCategory="game" forces activity recreation | Android 16 with appCategory="game" forces activity recreation
I’m running into an issue with the new Android 16 behavior change regarding orientation handling.
My app is a game, and in the manifest I’ve set:
<application
android:appCategory="game" ... >
<activity
android:name=".GameActivity"
... | https://stackoverflow.com/questions/79796913/android-16-with-appcategory-game-forces-activity-recreation | android, kotlin, android-activity, screen-orientation, activity-lifecycle | 1,761,144,257 |
se_79796712 | stackoverflow | MOBILE_DEVELOPMENT | Kotlin View Binding becomes Null outside liifecycle methods when returning from fragment | Kotlin View Binding becomes Null outside liifecycle methods when returning from fragment
I have an app structured with one MainActivity and several fragments which are communicated with by some ImageButtons in this activity. In one fragment (UnreviewedFragment), I have a RecyclerView whose Adapter can be changed to di... | https://stackoverflow.com/questions/79796712/kotlin-view-binding-becomes-null-outside-liifecycle-methods-when-returning-from | android, kotlin, android-fragments | 1,761,132,741 |
se_79729467 | stackoverflow | MOBILE_DEVELOPMENT | Fatal Exception: java.lang.IllegalArgumentException Cannot coerce value to an empty range: maximum 0 is less than minimum 7 | Fatal Exception: java.lang.IllegalArgumentException Cannot coerce value to an empty range: maximum 0 is less than minimum 7
I’m using Jetpack Compose’s HorizontalPager with a dynamic list of items in my app. Occasionally, my crash reporting service logs the following crash, but I have never been able to reproduce it l... | https://stackoverflow.com/questions/79729467/fatal-exception-java-lang-illegalargumentexception-cannot-coerce-value-to-an-em | android, kotlin, android-jetpack-compose, android-jetpack, horizontal-pager | 1,754,639,428 |
se_79675633 | stackoverflow | MOBILE_DEVELOPMENT | How to get tiered prices and first (min) and last (max) unit? | How to get tiered prices and first (min) and last (max) unit?
I'm trying to retrieve the tiered pricing details from my Stripe product using the Stripe SDK. I’m passing the correct product_id and successfully retrieving a Price object that has billing_scheme = tiered.
However, the tiers field on the Price object is nu... | https://stackoverflow.com/questions/79675633/how-to-get-tiered-prices-and-first-min-and-last-max-unit | java, kotlin, stripe-payments | 1,750,654,771 |
se_79796325 | stackoverflow | MOBILE_DEVELOPMENT | Updating reactnative bundle release | Updating reactnative bundle release
After updating bundle to the custom path ${RNFS.DocumentDirectoryPath}/bundle/index.android.bundle;
the bundle updates but doesn't get resources and assets require('../resources/loading1.gif'), not even default app icon like the back navigation icon can be found. How do I update bu... | https://stackoverflow.com/questions/79796325/updating-reactnative-bundle-release | android, react-native, kotlin, bundle | 1,761,093,527 |
se_75150167 | stackoverflow | MOBILE_DEVELOPMENT | Instrumented Tests Will Not Run -- 6 files found with path 'META-INF/LICENSE.md' | Instrumented Tests Will Not Run -- 6 files found with path 'META-INF/LICENSE.md'
Edit: Found out that MockK is causing this issue. I guess it is duplicating these files when I'm mocking my API request. When I remove MockK and/or Mockito. I do not get these errors. Any ideas?
Getting this error stating that the... | https://stackoverflow.com/questions/75150167/instrumented-tests-will-not-run-6-files-found-with-path-meta-inf-license-md | android, kotlin, gradle, build.gradle, android-testing | 1,673,976,880 |
se_79795358 | stackoverflow | MOBILE_DEVELOPMENT | Hilt not generating PreferencesModule_ProvidePreferencesDataStoreFactory when injecting DataStore (NoClassDefFoundError) | Hilt not generating PreferencesModule_ProvidePreferencesDataStoreFactory when injecting DataStore (NoClassDefFoundError)
I’m trying to inject a DataStore instance with Hilt in my Android project.
Everything builds fine until I uncomment the observePreferences() function inside the ViewModel, where I collect the Flow.
... | https://stackoverflow.com/questions/79795358/hilt-not-generating-preferencesmodule-providepreferencesdatastorefactory-when-in | android, kotlin, dagger-hilt, datastore | 1,761,002,313 |
se_79715696 | stackoverflow | MOBILE_DEVELOPMENT | Jetpack Compose FloatingActionButton shadow disappears or gets clipped during visibility animation | Jetpack Compose FloatingActionButton shadow disappears or gets clipped during visibility animation
I'm using Jetpack Compose to animate a FloatingActionButton that hides when the user scrolls down and reappears when scrolling up.
To animate the FAB, I use AnimatedVisibility with fadeIn/fadeOut and scaleIn/scaleOut tra... | https://stackoverflow.com/questions/79715696/jetpack-compose-floatingactionbutton-shadow-disappears-or-gets-clipped-during-vi | android, kotlin, android-jetpack-compose | 1,753,535,724 |
se_51139833 | stackoverflow | MOBILE_DEVELOPMENT | Room: how to check whether row exists | Room: how to check whether row exists
In my repository class, I want to fetch data only if none exists in a Room table. How to check whether any row exists in a table? | https://stackoverflow.com/questions/51139833/room-how-to-check-whether-row-exists | android, kotlin, android-room | 1,530,546,839 |
se_79793843 | stackoverflow | MOBILE_DEVELOPMENT | getApplicationContext() unresolved in Android Studio Kotlin | getApplicationContext() unresolved in Android Studio Kotlin
I am trying to open a per-app file in my first ever android kotlin app. Depending on what I try it either crashes or fails to resolve getApplicationContext()
The lines:
val file = File("johnstest.txt")
file.writeText("Blah")
crash the program. android.com su... | https://stackoverflow.com/questions/79793843/getapplicationcontext-unresolved-in-android-studio-kotlin | android, kotlin | 1,760,803,430 |
se_79685691 | stackoverflow | MOBILE_DEVELOPMENT | Mapstruct @Context doesn't work - No property named "myContext1.param1" exists in source parameter(s) | Mapstruct @Context doesn't work - No property named "myContext1.param1" exists in source parameter(s)
Based on MapStruct QualifiedByName with multiple parameters
I have following code for mappers:
data class MySource (
val name: String = "deposit"
)
data class MyContext1(
val param1: String = "p... | https://stackoverflow.com/questions/79685691/mapstruct-context-doesnt-work-no-property-named-mycontext1-param1-exists-i | kotlin, mapstruct | 1,751,356,030 |
se_78876299 | stackoverflow | MOBILE_DEVELOPMENT | jetpack compose does not detect state change when i update an arraylist | jetpack compose does not detect state change when i update an arraylist
i have an object which hold the state of my ui which looks like this:
data class MainActivityUiState(
/*** rest **/
val usersData : ArrayList<Users>
)
i intailize it like this in the view model
private val _uiState = MutableStateFlow(... | https://stackoverflow.com/questions/78876299/jetpack-compose-does-not-detect-state-change-when-i-update-an-arraylist | android, kotlin, android-jetpack-compose, android-jetpack | 1,723,744,462 |
se_79790408 | stackoverflow | MOBILE_DEVELOPMENT | How can I make a child Image overflow beyond its parent Row bounds in Jetpack Compose (similar to SwiftUI behavior)? | How can I make a child Image overflow beyond its parent Row bounds in Jetpack Compose (similar to SwiftUI behavior)?
I’m building a dynamic Jetpack Compose UI where layouts are driven by JSON configuration.
Each container can be either vertical (Column) or horizontal (Row), and components like text, icons, and images ... | https://stackoverflow.com/questions/79790408/how-can-i-make-a-child-image-overflow-beyond-its-parent-row-bounds-in-jetpack-co | android, kotlin, android-jetpack-compose, android-jetpack | 1,760,459,867 |
se_41964644 | stackoverflow | MOBILE_DEVELOPMENT | break or return from when expressions | break or return from when expressions
What I would like to do:
when(transaction.state) {
Transaction.Type.EXPIRED,
//about 10 more types
Transaction.Type.BLOCKED -> {
if (transaction.type == Transaction.Type.BLOCKED && transaction.closeAnyway) {
close(transaction)
break //c... | https://stackoverflow.com/questions/41964644/break-or-return-from-when-expressions | kotlin | 1,485,886,426 |
se_79792099 | stackoverflow | MOBILE_DEVELOPMENT | Functional core - Imperative shell: dealing with logic dependant on conditional & expensive IO operations | Functional core - Imperative shell: dealing with logic dependant on conditional & expensive IO operations
tldr; how does one deal with logic that depends on data that are too heavy to fetch up-front when subscribing to the functional core, imperative shell line of thought?
Years ago I was inspired by Gary Bernhard... | https://stackoverflow.com/questions/79792099/functional-core-imperative-shell-dealing-with-logic-dependant-on-conditional | kotlin, functional-programming, side-effects | 1,760,614,936 |
se_79793651 | stackoverflow | MOBILE_DEVELOPMENT | AnimatedContent, is the targetState parameter always necessary? | AnimatedContent, is the targetState parameter always necessary?
Inside a composable I have a call to another composable to display the actual content area:
Content(dat = dat, uiState = uiState, onUiEvent = onUiEvent)
On the even that uiState.singleId changes the "dat" value is recalculated by a viewmodel and everythin... | https://stackoverflow.com/questions/79793651/animatedcontent-is-the-targetstate-parameter-always-necessary | android, kotlin, android-jetpack-compose | 1,760,776,972 |
se_79794118 | stackoverflow | MOBILE_DEVELOPMENT | Should I always initialize a viewmodel at the start? | Should I always initialize a viewmodel at the start?
Should I always initialize a viewmodel in the Activity, before onCreate() even, if it is needed later in the flow?
I do not know and am concerned if initialization of all the viewmodels right at the start will hinder the app's performance. Most of them won't be exec... | https://stackoverflow.com/questions/79794118/should-i-always-initialize-a-viewmodel-at-the-start | android, kotlin, android-jetpack-compose, viewmodel, android-viewmodel | 1,760,854,760 |
se_79724141 | stackoverflow | MOBILE_DEVELOPMENT | Implement same task for two different user interfaces in Kotlin | Implement same task for two different user interfaces in Kotlin
I am working on a program which has both a TUI (terminal user interface) as well as a GUI (graphical user interface).
The program has some functions which take quite a long time to complete (waiting on network requests and such). I know that I can use thr... | https://stackoverflow.com/questions/79724141/implement-same-task-for-two-different-user-interfaces-in-kotlin | kotlin, user-interface, events, kotlin-coroutines | 1,754,235,863 |
se_79681028 | stackoverflow | MOBILE_DEVELOPMENT | App Crashing When Context Variable is Passed to a Class | App Crashing When Context Variable is Passed to a Class
With the code below, the app crashes when the @Composable function is ran and the Queries class is called:
Edit below with a minimal reproducible example:
Catalog:
[versions]
agp = "8.10.1"
kotlin = "2.0.21"
coreKtx = "1.16.0"
junit = "4.13.2"
junitVersion = "1.2... | https://stackoverflow.com/questions/79681028/app-crashing-when-context-variable-is-passed-to-a-class | kotlin, android-jetpack-compose | 1,750,963,902 |
se_79793366 | stackoverflow | MOBILE_DEVELOPMENT | DiskReadViolation on Ktor with json negotiation | DiskReadViolation on Ktor with json negotiation
My StrickMode and Ktor HttpClient setup on Android
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
import io.ktor.serialization.kotlinx.json.json
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
StrictMo... | https://stackoverflow.com/questions/79793366/diskreadviolation-on-ktor-with-json-negotiation | android, kotlin, serialization, ktor | 1,760,727,086 |
se_68285299 | stackoverflow | MOBILE_DEVELOPMENT | EnableEurekaClient import doesn't exist | EnableEurekaClient import doesn't exist
I added spring-cloud-starter-netflix-eureka-client gradle depedency in
my project and shrik the depedency. But when go use
@EnableEurekaClient in my Main class it show me suggestion create
@EnableEurekaClient annotation. Don't show any import file of eureka
client.
Unresol... | https://stackoverflow.com/questions/68285299/enableeurekaclient-import-doesnt-exist | spring-boot, kotlin, spring-cloud, netflix-eureka, spring-cloud-netflix | 1,625,657,909 |
se_79793030 | stackoverflow | MOBILE_DEVELOPMENT | Proper handling of screen orientation across Kotlin and Java activities | Proper handling of screen orientation across Kotlin and Java activities
I’m working on an Android app that has both Kotlin and Java activities. I want to handle screen orientation correctly depending on the device and the activity type. There are three main cases:
Phone screens → always portrait.
Tablet screens with ... | https://stackoverflow.com/questions/79793030/proper-handling-of-screen-orientation-across-kotlin-and-java-activities | android, kotlin, android-manifest, orientation, screen-orientation | 1,760,701,706 |
se_79792892 | stackoverflow | MOBILE_DEVELOPMENT | Have you used immutableList in Android Compose? | Have you used immutableList in Android Compose?
Have you used immutableList from kotlinx.collections.immutable. And did you see the performance changes in your project ? Thank you in advance for sharing your experiences | https://stackoverflow.com/questions/79792892/have-you-used-immutablelist-in-android-compose | android, kotlin, android-jetpack-compose | 1,760,689,442 |
se_79788185 | stackoverflow | MOBILE_DEVELOPMENT | Android app crashing when implementing a HiltViewModel | Android app crashing when implementing a HiltViewModel
My HiltViewModel with a database:
@Module
@InstallIn(SingletonComponent::class)
object AppDatabaseModule {
@Provides
@Singleton
fun providesAppDatabase(
@ApplicationContext applicationContext: Context,
): AppDatabase = Room.databaseBuilder(... | https://stackoverflow.com/questions/79788185/android-app-crashing-when-implementing-a-hiltviewmodel | android, kotlin, android-jetpack-compose | 1,760,209,929 |
se_79791971 | stackoverflow | MOBILE_DEVELOPMENT | Flutter Android: Failed to apply plugin 'dev.flutter.flutter-gradle-plugin' | Flutter Android: Failed to apply plugin 'dev.flutter.flutter-gradle-plugin'
Description
Recently I upgraded my Flutter version to 3.35.6. I updated by .gradle-files to .gradle.kts-files. Now if I want to build my app on a physical Android device with flutter run I get the following error.
My Versions:
Flutter... | https://stackoverflow.com/questions/79791971/flutter-android-failed-to-apply-plugin-dev-flutter-flutter-gradle-plugin | android, flutter, kotlin, gradle | 1,760,606,466 |
se_79792081 | stackoverflow | MOBILE_DEVELOPMENT | Unable to run TestNG classes with groups filter | Unable to run TestNG classes with groups filter
I'm trying to use class-level filters/groups to run specified tests with TestNG. However, it's unable to detect any tests when I use the groups filter.
Example test classes:
@Test(groups = ["smoke"])
class Test1 : BaseClass {
fun testMethod1() {
...
}
... | https://stackoverflow.com/questions/79792081/unable-to-run-testng-classes-with-groups-filter | kotlin, gradle, build.gradle, testng | 1,760,613,924 |
se_79792049 | stackoverflow | MOBILE_DEVELOPMENT | Android - Print Manager Is Not Working When I Downlaod the pdf and print that like gmail | Android - Print Manager Is Not Working When I Downlaod the pdf and print that like gmail
suspend fun downloadPdf(url: String, token: String): File = withContext(Dispatchers.IO) {
val client = OkHttpClient()
val request = Request.Builder()
.url(url)
.addHeader("Authorization", "Bearer $token")
.build()
val response... | https://stackoverflow.com/questions/79792049/android-print-manager-is-not-working-when-i-downlaod-the-pdf-and-print-that-li | android, kotlin | 1,760,611,627 |
se_78909888 | stackoverflow | MOBILE_DEVELOPMENT | Failed to Resolve Dependency: org.webrtc:google-webrtc:1.0.32006 in Kotlin | Failed to Resolve Dependency: org.webrtc:google-webrtc:1.0.32006 in Kotlin
I'm trying to add the WebRTC library to my Android project, but I'm encountering an issue with resolving the dependency. Here's the relevant part of my build.gradle.kts file:
dependencies {
implementation("org.webrtc:google-webrtc:1.0.32006... | https://stackoverflow.com/questions/78909888/failed-to-resolve-dependency-org-webrtcgoogle-webrtc1-0-32006-in-kotlin | java, kotlin, webrtc | 1,724,529,536 |
se_79790346 | stackoverflow | MOBILE_DEVELOPMENT | Error when running a HiltWorker on app start: NoSuchMethodException | Error when running a HiltWorker on app start: NoSuchMethodException
I’m trying to make a Worker run automatically when the app starts for testing purposes. The idea is that when I open the app, the Worker fetches the list of tracked animes and shows a notification for each one.
However, when I open the app, I get the ... | https://stackoverflow.com/questions/79790346/error-when-running-a-hiltworker-on-app-start-nosuchmethodexception | android, kotlin, dagger-hilt, android-workmanager | 1,760,455,716 |
se_45875491 | stackoverflow | MOBILE_DEVELOPMENT | What is a "receiver" in Kotlin? | What is a "receiver" in Kotlin?
How is it related to extension functions? Why is with a function, not a keyword?
There appears to be no explicit documentation for this topic, only the assumption of knowledge in reference to extensions. | https://stackoverflow.com/questions/45875491/what-is-a-receiver-in-kotlin | kotlin, terminology | 1,503,642,125 |
se_79790702 | stackoverflow | MOBILE_DEVELOPMENT | How to efficiently query data from lists with bundles | How to efficiently query data from lists with bundles
I have xId, yId, and zId bundles as a list, and I have to look them up in the DB using Where conditions. Is there a way to look up them most efficiently.
val bundledList = listOf(
listOf(1, 1, 1),
listOf(2, 2, 2),
listOf(3, 3, 3),
...
)
bundledList
... | https://stackoverflow.com/questions/79790702/how-to-efficiently-query-data-from-lists-with-bundles | kotlin, jpa | 1,760,488,389 |
se_78622059 | stackoverflow | MOBILE_DEVELOPMENT | Intent.createChooser automatically hides statusbar and causes layout jumping on some devices | Intent.createChooser automatically hides statusbar and causes layout jumping on some devices
Each time I open the intentChooser, the statusbar automatically hides and the view jumps. This only happens on some devices (Samsung S22 in this case) but no on the Pixel 3a emulator.
You can find a screen recording here: http... | https://stackoverflow.com/questions/78622059/intent-createchooser-automatically-hides-statusbar-and-causes-layout-jumping-on | android, kotlin, android-jetpack-compose | 1,718,356,665 |
se_79787749 | stackoverflow | MOBILE_DEVELOPMENT | Whats the correct way to merge generated AndroidManifest.xml by KSP? | Whats the correct way to merge generated AndroidManifest.xml by KSP?
The generated additional AndroidManifest.xml components with KSP
val xml = XML {
indentString = " "
repairNamespaces = false
xmlVersion = XmlVersion.XML10
xmlDeclMode = XmlDeclMode.Charset
}
... | https://stackoverflow.com/questions/79787749/whats-the-correct-way-to-merge-generated-androidmanifest-xml-by-ksp | android, kotlin, android-manifest, ksp | 1,760,141,822 |
se_48932504 | stackoverflow | MOBILE_DEVELOPMENT | Kotlin Higher Order Function Composition | Kotlin Higher Order Function Composition
I'm trying to figure out how I can declaritively define a function as a composition of two other functions in Kotlin but I'm struggling. Here is my code:
fun compose(a: (Int, Int) -> Int, b: (Int, Int) -> Int): Int {
return a.invoke() + b.invoke()
}
The idea of the compo... | https://stackoverflow.com/questions/48932504/kotlin-higher-order-function-composition | kotlin, higher-order-functions, kotlin-higher-order-functions | 1,519,316,989 |
se_78836063 | stackoverflow | MOBILE_DEVELOPMENT | Cannot limit the concurrency of servlet requests using Spring Boot virtual threads with Tomcat | Cannot limit the concurrency of servlet requests using Spring Boot virtual threads with Tomcat
I am updating a Kotlin (v1.9.25) Spring Boot (v3.3.1) project from Java 17 to Java 21 in order to enable Virtual Threads.
In our service, almost all requests acquire one database connection and hold to it for the whole reque... | https://stackoverflow.com/questions/78836063/cannot-limit-the-concurrency-of-servlet-requests-using-spring-boot-virtual-threa | java, spring-boot, multithreading, kotlin, virtual-threads | 1,722,884,679 |
se_79790666 | stackoverflow | MOBILE_DEVELOPMENT | Kotlin Multiplatform: Could not resolve <unknown coordinates> for iOS targets when building Google Maps module | Kotlin Multiplatform: Could not resolve <unknown coordinates> for iOS targets when building Google Maps module
I’m currently working on a Kotlin Multiplatform (KMP) project that includes a module for Google Maps integration (:core:maps:v2).
Everything works fine on Android, but when I try to build for iOS, I get... | https://stackoverflow.com/questions/79790666/kotlin-multiplatform-could-not-resolve-unknown-coordinates-for-ios-targets-wh | android, ios, kotlin, compilation, kotlin-multiplatform | 1,760,480,271 |
se_79790640 | stackoverflow | MOBILE_DEVELOPMENT | Recording sounds in apps | Recording sounds in apps
I was developing an app that includes a screen recording feature which captures both the microphone and system audio simultaneously and then mixes them together. Everything worked perfectly until I tested it during a Discord call, i noticed that as soon as I joined the call, any kind of audio ... | https://stackoverflow.com/questions/79790640/recording-sounds-in-apps | android, kotlin, voip, mediaprojection | 1,760,477,654 |
se_79790326 | stackoverflow | MOBILE_DEVELOPMENT | Foreground Service: Where should I put the code I actually want to run? | Foreground Service: Where should I put the code I actually want to run?
I recently learned about Foreground Services in Android and how to use them.
Often what is used in examples is something like this:
class MyForegroundService : Service() {
...
override fun onStartCommand(intent: Intent?, flags: Int, startId: In... | https://stackoverflow.com/questions/79790326/foreground-service-where-should-i-put-the-code-i-actually-want-to-run | android, kotlin, android-service, foreground-service | 1,760,454,502 |
se_79790199 | stackoverflow | MOBILE_DEVELOPMENT | How to deserialize polymorphic objects in MongoDB? | How to deserialize polymorphic objects in MongoDB?
I am developing a project using Kotlin and the Quarkus framework (version 3.20 LTS), that connects to a MongoDB database, which has already been populated previously with some documents using the mongosh tool. To simplify CRUD operations, I am using Panache.
All the d... | https://stackoverflow.com/questions/79790199/how-to-deserialize-polymorphic-objects-in-mongodb | mongodb, kotlin, jackson, quarkus, quarkus-panache | 1,760,446,984 |
se_79789908 | stackoverflow | MOBILE_DEVELOPMENT | Kotlin/Spring Boot and Swagger Docs show inherence of data class models when using openapi-generator-maven-plugin (Polymorphic DTOs) | Kotlin/Spring Boot and Swagger Docs show inherence of data class models when using openapi-generator-maven-plugin (Polymorphic DTOs)
I’ve built a Spring Boot REST API that exposes an endpoint returning a list of animals (/animals).
The API supports multiple animal subtypes (Cat, Bird), each with unique fields, and I’v... | https://stackoverflow.com/questions/79789908/kotlin-spring-boot-and-swagger-docs-show-inherence-of-data-class-models-when-usi | spring-boot, kotlin, swagger | 1,760,426,303 |
se_52343233 | stackoverflow | MOBILE_DEVELOPMENT | How to create a String with a certain length and the same value effectively in Kotlin | How to create a String with a certain length and the same value effectively in Kotlin
I knew this can be achieved with a for loop, but I am looking for a better solution.
createDummyString(1, 'A') = 'A'
createDummyString(2, 'A') = 'AA'
This will be used in Hangman. | https://stackoverflow.com/questions/52343233/how-to-create-a-string-with-a-certain-length-and-the-same-value-effectively-in-k | kotlin | 1,537,001,761 |
se_51610420 | stackoverflow | MOBILE_DEVELOPMENT | Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0 | Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0
I've got a gradle FAILURE:
..."Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0."
Case description:
Attached to the project codebase the next libs:
APP/build.gradle
//(Requir... | https://stackoverflow.com/questions/51610420/deprecated-gradle-features-were-used-in-this-build-making-it-incompatible-with | android, unit-testing, gradle, kotlin, junit5 | 1,533,030,441 |
se_79703961 | stackoverflow | MOBILE_DEVELOPMENT | Gradle Sync Fails: "Plugin [id: 'com.google.devtools.ksp'] was not found" on a clean project | Gradle Sync Fails: "Plugin [id: 'com.google.devtools.ksp'] was not found" on a clean project
I'm facing a persistent Gradle sync issue in a brand new Android Studio project and I've run out of all standard solutions. Even after a complete clean install, the problem remains.
The Error:
When I try to s... | https://stackoverflow.com/questions/79703961/gradle-sync-fails-plugin-id-com-google-devtools-ksp-was-not-found-on-a-c | android, kotlin, gradle, ksp | 1,752,695,558 |
se_77690261 | stackoverflow | MOBILE_DEVELOPMENT | flutter can't open launch Url google drive | flutter can't open launch Url google drive
when i call launchUrl (url_launcher 6.2.2)
it's not working or outstanding.
I want to open goole drive with link.
final Uri url = Uri.parse("googel drive link share all people have");
bool res = await launchUrl(url);
if (!res) {throw Exception('Could not launch url')... | https://stackoverflow.com/questions/77690261/flutter-cant-open-launch-url-google-drive | flutter, kotlin, dart, url, google-drive-api | 1,703,062,294 |
se_79692935 | stackoverflow | MOBILE_DEVELOPMENT | Flutter Execution failed for task ':app:compileReleaseKotlin' | Flutter Execution failed for task ':app:compileReleaseKotlin'
I am trying to build the apk --release file for my flutter app but im getting this issue
What went wrong:
Execution failed for task ':app:compileReleaseKotlin'.
A failure occurred while executing >org.jetbrains.kotlin.compilerRunner.GradleCompiler... | https://stackoverflow.com/questions/79692935/flutter-execution-failed-for-task-appcompilereleasekotlin | android, flutter, kotlin, gradle, apk | 1,751,895,091 |
se_74117247 | stackoverflow | MOBILE_DEVELOPMENT | How to run kotlin code with root privilege? | How to run kotlin code with root privilege?
I'm using this library to get root access https://github.com/topjohnwu/libsu
I can run bash code with root privilege;
Initialization:
class MainActivity : ComponentActivity() {
companion object {
init {
//here goes static initializer code
... | https://stackoverflow.com/questions/74117247/how-to-run-kotlin-code-with-root-privilege | android, kotlin, android-service, root | 1,666,125,763 |
se_79782944 | stackoverflow | MOBILE_DEVELOPMENT | GraalVM buildNativeLambda Failing on Adding AWS Dependencies : Linker command exited with 1 | GraalVM buildNativeLambda Failing on Adding AWS Dependencies : Linker command exited with 1
I have a micronaut project setup in kotlin.
I was able to build graalvm native image earlier. Now I have added two aws dependencies in this project :
implementation("software.amazon.awssdk:s3")
implementation("software.amazon.a... | https://stackoverflow.com/questions/79782944/graalvm-buildnativelambda-failing-on-adding-aws-dependencies-linker-command-ex | kotlin, micronaut, graalvm, graalvm-native-image, micronaut-aws | 1,759,662,288 |
se_79732881 | stackoverflow | MOBILE_DEVELOPMENT | Setting Min SDK Version to 23 or higher Breaks Support for 16KB Page Size Devices | Setting Min SDK Version to 23 or higher Breaks Support for 16KB Page Size Devices
I’m working with the latest stable Flutter version and recently ran into a puzzling issue regarding the 16 KB page size warning in the Google Play Console.
Last week, I received the 16 KB page size warning on my actual project and Google... | https://stackoverflow.com/questions/79732881/setting-min-sdk-version-to-23-or-higher-breaks-support-for-16kb-page-size-device | android, flutter, kotlin, gradle, 16kb-page-size | 1,754,987,500 |
se_79787770 | stackoverflow | MOBILE_DEVELOPMENT | Adding new ReactActivity to run another js bundle | Adding new ReactActivity to run another js bundle
I'm trying to make my React Native Android app to have another Activity, beside MainActivity, be able to run another js bundle. I managed to achieve that with this implementation:
import android.app.Activity
import android.os.Bundle
import com.facebook.react.ReactHost
... | https://stackoverflow.com/questions/79787770/adding-new-reactactivity-to-run-another-js-bundle | java, android, react-native, kotlin, react-android | 1,760,147,573 |
se_79616511 | stackoverflow | MOBILE_DEVELOPMENT | ExoPlayer zooms or crops video after quality change on Android TV using Media3 (v1.6.1) | ExoPlayer zooms or crops video after quality change on Android TV using Media3 (v1.6.1)
I'm working on a video streaming app that uses ExoPlayer with Media3 version 1.6.1 and androidx.media3.ui.PlayerView inside Jetpack Compose. Our service streams live and on-demand content (like Aparat Sport), and we allow users to ... | https://stackoverflow.com/questions/79616511/exoplayer-zooms-or-crops-video-after-quality-change-on-android-tv-using-media3 | android, kotlin, android-jetpack-compose, video-streaming, exoplayer | 1,746,968,539 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.