In a Kotlin file I try to overload the equals method of the BigDecimal class. I have the following piece of code for that: fun BigDecimal.equals(n: Any?): Bool
on Ruby one have something like this: @var ||= 'value' basically, it means that @var will be assigned 'value' only if @var is not assigned yet (e.g. if @var
I'm working on a project combining groovy and kotlin. My Kotlin classes require objects from groovy part, how can i make gradle compile groovy before kotlin ?
Trying to use kotlin-dotnet, but this is not working, using kotlin object class, to manage singleton Got error Could not find /asset/env on the classpath where
Im using datastore in one of my android library and I get crashes from google vitals that I cant reproduce and should not be possible... I create my datastore a
i just created an app where my function getdata() call every second to fetch new data from server and updateui() function will update view in UI i don't use any
I'm trying to think of a function that would allow a Map<String, Any?> object to be treated as Map<String,Any> through type inference through applyi
I'm in Bumblebee v.2021.1.1. I don't have any database elements in my project. I do have defaults in the first fragment: import com.my.app.databinding.FragmentF
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) in
I started trying jetpack Compose recently and used hilt & hilt-navigation-compose for my app. It works fine with the first ViewModel. However, when I try th
I want o implement push notification. I added to project level: dependencies { classpath 'com.android.tools.build:gradle:2.2.2' classpath 'com.
@Module @InstallIn(SingletonComponent::class) class WheelModule constructor(val size:Int) { @Provides fun provideWheel():Wheel = Wheel(size) } Module
I'm actually creating a new app in kotlin to display an xml file in boxes with the informations formatted To problem is that when I'm building the app, there i
I'm trying to use Kotlin in my Android project. I need to create custom view class. Each custom view has two important constructors: public class MyView extend
Sometimes I faced with rare bug in my application. But I can't reproduce it as it's very rare. So, I decided to write simple espresso test: @RunWith(AndroidJUn
I'm just starting out on learning Kotlin, and I'm currently making a simple Quiz application for Android. The user can choose an answer with four buttons which
I have hosted assetlinks file into our domain https://ourdomain/.well-known/assetlinks.json And also verified this using https://developers.google.com/digital-a
When I use ExpediaGroup graphql-kotlin client to call a GQL query, it inserts a field besides the query, variables and operationName. I understand this field co
How to see the type of variable in Android Studio when using Kotlin without type annotations. Currently I'm trying to see it by giving the variable a type I kn
My onActivityResult is not working because getBitmap is deprecated, any alternative codes to achieve this? here are the codes that needs to be changed, any sug