https://kotlinlang.org
Join Slack
what can I do if the `compileKotlin` Gradle task always hangs for 10+ minutes, and launches a Java p...
a

Adam S

over 2 years ago
what can I do if the
compileKotlin
Gradle task always hangs for 10+ minutes, and launches a Java process that takes up 100% CPU? This is for a small v1.8.10 project with ~10 Kotlin classes (Gradle 8.0.2) I’ve tried cleaning, rebooting, running with
--no-build-cache
,
--no-configuration-cache
,
kotlin.incremental=false
, `kotlin.caching.enabled=false`…
a
t
h
  • 3
  • 19
  • 1103
Has anyone been able to successfully use FlowRow and alignment? Seems like it's not possible to vert...
c

Colton Idle

over 2 years ago
Has anyone been able to successfully use FlowRow and alignment? Seems like it's not possible to vertically center items in a flow row due to FlowRowScopeInstance being private.
c
r
f
  • 3
  • 18
  • 1102
Is there a KMM library similar to Retrofit or is using just Ktor the best bet?
m

Marcin Wisniowski

about 3 years ago
Is there a KMM library similar to Retrofit or is using just Ktor the best bet?
m
m
+4
  • 6
  • 7
  • 1098
I can’t pass a drawable id (R.drawable.image) as an INT for my painterResource(). When running in re...
a

Aaron Waller

about 3 years ago
I can’t pass a drawable id (R.drawable.image) as an INT for my painterResource(). When running in release mode I get the following crash:
java.lang.IllegalArgumentException: Only VectorDrawables and rasterized asset types are supported ex. PNG, JPG
the image I pass as an INT is a PNG.
a
a
+2
  • 4
  • 7
  • 1095
Heyy, can I use JPA in Ktor? I tried many orms like Exposed or Ktorm, I didn't like any of them like...
o

Okan Yıldırım

over 3 years ago
Heyy, can I use JPA in Ktor? I tried many orms like Exposed or Ktorm, I didn't like any of them like Spring Data JPA. I was just simply creating a class with annotations and a repository, thats all. I am looking for something similar for Ktor
o
f
+5
  • 7
  • 15
  • 1093
Hey guys, I keep on getting `viewModelFactory lateinit has not been initialized errpr` when injectin...
j

Jabez Magomere

over 5 years ago
Hey guys, I keep on getting
viewModelFactory lateinit has not been initialized errpr
when injecting a dagger view model factory into a fragment and initialising the viewmodel using viewmodel lazy delegate property, here is a snippet of my code.. Error :
Fatal Exception: kotlin.UninitializedPropertyAccessException
lateinit property viewModelFactory has not been initialized
Code:
class DeliveriesFragment() : Fragment(){

    @Inject
    lateinit var daggerViewModelFactory: DaggerViewModelFactory
    private val upcomingDeliveriesViewModel : UpcomingDeliveriesViewModel by viewModels { daggerViewModelFactory }

    override fun onAttach(context: Context) {
        SalesApplication.salesComponent().inject(this)
        super.onAttach(context)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        observeDeliveries()
    }

    private fun observeDeliveries(){
        upcomingDeliveriesViewModel.loadUpcomingUserDeliveries("").observe(viewLifecycleOwner, Observer {
            //displayList()
        })
    }
}
j
s
+4
  • 6
  • 6
  • 1089
i can't invoke the composable function inside of button onclick.and, I getting this error '@Composab...
p

Praveen Kumar

over 2 years ago
i can't invoke the composable function inside of button onclick.and, I getting this error '@Composable invocations can only happen from the context of a @Composable function'
p
s
  • 2
  • 20
  • 1088
Is it possible to "Reset" an object in a test?
l

LeoColman

over 6 years ago
Is it possible to "Reset" an object in a test?
l
a
+4
  • 6
  • 17
  • 1088
I'm getting this error when working with 2.0.20-RC2-1.0.24 on js target. See thread:
r

Robert Jaros

about 1 year ago
I'm getting this error when working with 2.0.20-RC2-1.0.24 on js target. See thread:
r
e
  • 2
  • 4
  • 1087
how do i import a kotlin script from a kotlin build script as i have a 1.6k line kotlin build script...
s

Smallville7123

over 6 years ago
how do i import a kotlin script from a kotlin build script as i have a 1.6k line kotlin build script (
build.gradle.kts
) that i want to split into smaller files
s
g
e
  • 3
  • 291
  • 1087
Previous373839Next

kotlinlang

A modern programming language that makes developers happier.

Powered by