Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [kotlin]

Kotlin is a cross-platform, statically typed, general-purpose high-level programming language with type inference. This tag is often used alongside additional tags for the different targets (JVM, JavaScript, native, etc.) and libraries/frameworks (Android, Spring, etc.) used by Kotlin developers, if the question relates specifically to those topics.

0 votes
0 answers
22 views

flutter build apk: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0

`When I run flutter build apk first time after cleaning project there are warnings in output. Second time there are no warnings e: C:/Users/izgrablic/.gradle/caches/8.9/transforms/...
izidoraz's user avatar
0 votes
1 answer
27 views

How to stop calling an api in the viewmodel from the activity's onCreate method when the configuration changes?

I have an activity and a viewmodel. The viewmodel has a callApi function. I am calling it from onCreate method. When I change the language configuration change takes place and onCreate will be call ...
user7029573's user avatar
0 votes
1 answer
48 views

Why is my room database data non persistent?

I have an android app that uses room database and dagger. I tried all the answers I found on the internet, and this is my last resort as I'm on the week 2 of solving this problem. My Setup: com....
jreloz's user avatar
  • 422
0 votes
0 answers
13 views

How to get unit test code coverage of Android kotlin project?

I have a Andorid kotlin project. I want to get the code coverage of the unit test using some script as it needs to be included in CI/CD pipeline. How can I achieve this? Thanks.
Abhiroop Nandi Ray's user avatar
1 vote
0 answers
12 views

kotlin multi platform project's podspec file spec.script_phases gets changed when syncing Android Studio and brakes pod installatioon

I'm working on a Kotlin multi platform library and it has a podspec file and its spec.script_phases is spec.script_phases = [ { :name => 'Build kotlin_mpp', :...
Vincenzo's user avatar
  • 6,022
-2 votes
0 answers
22 views

How to set foreign key constraint order by JPA annotation? [closed]

I'm using JPA in a Spring-Boot application with JPA (jakarta.persistence Annotations). The creation of my DB schema (hbm2ddl=create) failed with an: ⚡ Foreign key constraint is incorrectly formed ...
Tobse's user avatar
  • 1,302
0 votes
0 answers
22 views

Android MaterialButton backgroundTint will not turn white

Currently in android I am setting up some buttons. Ive gone to think that material buttons are the easiest to use as I have quite a lot of use cases where I need to set corner radius etc. ...
Tahulrik's user avatar
0 votes
0 answers
14 views

Error integrating google_maps_flutter and location packages in Flutter Kotlin Version Mismatch with Flutter SDK Versions

Description: I'm facing an issue with Kotlin version mismatching the SDK versions in my Flutter project. Despite trying different versions of Kotlin and the Android Gradle plugin, I’m encountering ...
Sethu's user avatar
  • 1
1 vote
1 answer
24 views

How to use "where" and extend another (generic) class at the same time in Kotlin?

I have two interfaces, Foo and Bar, and I have a class Baz<T : Foo>. I want to create a new class Buz<T> that extends Baz, where Buz's type parameter extends both Foo and Bar. So it'd look ...
The Zip Creator's user avatar
0 votes
0 answers
28 views

For Kotlin inline functions when is the 'outer scope' become a problem; what is the 'outer scope' of the lambda? [closed]

I understand that inlining a function is not possible when the lambda function is capturing variables from the surrounding scope. So the lambda function or block is not known ahead of time; and the ...
user1743524's user avatar
0 votes
0 answers
13 views

GLSL Wallpaper Service Showing Black Screen

I'm working on an Android project where I want to set a GLSL shader as the wallpaper using a WallpaperService. The goal is to display a simple gray color shader, but I'm encountering an issue where ...
Dhruv Bansal's user avatar
2 votes
2 answers
48 views

Puzzling Coroutines behavior in Android ViewModel

I am trying to explore and implement coroutine cancellation / exception recovery mechanism in ViewModel. I discovered that the following code in my ViewModel doesn't catch the exception and crashes ...
Shyam Patel's user avatar
0 votes
0 answers
12 views

Android Compose equivalent to view's performAccessibilityAction for Talkback navigation?

Is there an equivalent to View.performAccessibilityAction(AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS, null) for Composables in Android Compose? I'm still freshly new to figuring out the ...
MajinKenn's user avatar
0 votes
0 answers
43 views

"Cross-origin redirect sign in on Google Chrome M115+ is no longer supported and will stop working on 24 June 2024." with kotlin android studio

i have a google signin auth for my kotlin android app but this massege "Cross-origin redirect sign in on Google Chrome M115+ is no longer supported and will stop working on 24 June 2024." is ...
Ammar Momani's user avatar
-1 votes
1 answer
48 views

stateFlow value changes, but subscribers are not notified

I use koin and jetpack compose. and when I update the stateFlow value, subscribers are not informed and there is no recomposition in the composable functions. part of code in view model: private val ...
nezzuko's user avatar

15 30 50 per page
1
3 4
5
6 7
6436