Peter Kucera
02/22/2021, 8:50 PMPeter Kucera
02/25/2021, 2:29 PMJoseph Roffey
03/01/2021, 3:37 PM./gradlew test
, I see a test report that is generated into build/reports/tests/testDebugUnitTest/index.html
However, when I look at this, it does not make the difference between the results of the Android tests and the iOS Tests clear to me.
Furthermore, when I add a line assertTrue(false)
into iosTest > KoinTest > checkAllModules
it does not register any failures, whereas when I add the same line into the androidTest
equivalent the test does fail.
Should I be running the iOS tests differently / does anyone know whether I have misunderstood something?
I was under the impression that when I run the gradle tests it should test both the iOS and the Android KoinTest methods.
Sorry if I’m missing something obvious.Lena Stepanova
03/08/2021, 4:24 PMval doOnStartup = koin.get<() -> Unit>() // doOnStartup is a lambda which is implemented in Swift on iOS side
doOnStartup.invoke()
When I try running my Android project, it crashes with
org.koin.core.error.NoBeanDefFoundException: No definition found for class:'kotlin.jvm.functions.Function0'. Check your definitions!
If I remove those two lines, it runs fine. I see that I can remove this doOnStartup both from common Koin and iOS code, because in KampKit it doesn't do anything important.
But why doesn't it work in my project, but in KampKit it does?Lena Stepanova
03/09/2021, 6:00 PMArchie
03/10/2021, 2:24 PMArchie
03/11/2021, 10:29 AMJetpack Compose
. I tried to convert the module to a Multiplatform Module
and move all android related code to androidMain
but I when building the app Compose
throws error. Also adding kotlin("android")
in the Kotlin Multiplatform
module throw and error org.gradle.api.GradleException: Please initialize at least one Kotlin target
.
Is there a way to work around this? Or is it better to create a seperate KMM module for the module and a serparate Android specific module for Android UI? Like:
:feature1
:feature1KMM
??
Thanks in advance.Shalom Halbert
03/23/2021, 9:45 PMMartins Iroka
04/16/2021, 11:40 AMwellingtoncosta
05/28/2021, 7:28 PMLena Stepanova
06/11/2021, 1:35 PM2021-06-11 15:15:27.627354+0200 TomE[409:67089] Debug: (DatabaseHelper) Getting all trackings from database
org.koin.core.error.InstanceCreationException: Could not create instance for [Single:'de.comp.proj.shared.ktor.TrackingKtorApi']
at 0 shared 0x00000001034297f8 kfun:kotlin.Exception#<init>(kotlin.String?;kotlin.Throwable?){} + 120
at 1 shared 0x000000010380ccc0 kfun:org.koin.core.error.InstanceCreationException#<init>(kotlin.String;kotlin.Exception){} + 120
at 2 shared 0x000000010380e134 kfun:org.koin.core.instance.InstanceFactory#create(org.koin.core.instance.InstanceContext){}1:0 + 1472
at 3 shared 0x000000010380e840 kfun:org.koin.core.instance.SingleInstanceFactory#create(org.koin.core.instance.InstanceContext){}1:0 + 268
at 4 shared 0x000000010380ed0c kfun:org.koin.core.instance.SingleInstanceFactory.get$lambda-0#internal + 208
at 5 shared 0x000000010380edb8 kfun:org.koin.core.instance.SingleInstanceFactory.$get$lambda-0$FUNCTION_REFERENCE$244.invoke#internal + 72
at 6 shared 0x000000010380ef1c kfun:org.koin.core.instance.SingleInstanceFactory.$get$lambda-0$FUNCTION_REFERENCE$244.$<bridge-UNN>invoke(){}#internal + 68
at 7 shared 0x0000000103829608 kfun:org.koin.mp.KoinPlatformTools#synchronized(kotlin.Any;kotlin.Function0<0:0>){0§<kotlin.Any?>}0:0 + 232
at 8 shared 0x000000010380eae8 kfun:org.koin.core.instance.SingleInstanceFactory#get(org.koin.core.instance.InstanceContext){}1:0 + 364
at 9 shared 0x0000000103815cf4 kfun:org.koin.core.registry.InstanceRegistry#resolveInstance(kotlin.String;kotlin.Function0<org.koin.core.parameter.DefinitionParameters>?){0§<kotlin.Any?>}0:0? + 508
at 10 shared 0x000000010381f090 kfun:org.koin.core.scope.Scope.resolveInstance#internal + 840
at 11 shared 0x000000010381ecb8 kfun:org.koin.core.scope.Scope#get(kotlin.reflect.KClass<*>;org.koin.core.qualifier.Qualifier?;kotlin.Function0<org.koin.core.parameter.DefinitionParameters>?){0§<kotlin.Any?>}0:0 + 1860
at 12 shared 0x00000001038d3c38 kfun:de.comp.proj.shared.models.GeofencingModel.<init>$<anonymous>_1-1#internal + 800
at 13 shared 0x00000001038d4c30 kfun:de.comp.proj.shared.models.GeofencingModel.$<init>$<anonymous>_1-1$FUNCTION_REFERENCE$169.invoke#internal + 152
at 14 shared 0x000000010345da40 kfun:kotlin.native.concurrent.FreezeAwareLazyImpl.getOrInit#internal + 748
at 15 shared 0x000000010345e0e4 kfun:kotlin.native.concurrent.FreezeAwareLazyImpl#<get-value>(){}1:0 + 500
at 16 shared 0x00000001038ce674 kfun:de.comp.proj.shared.models.GeofencingModel.<get-trackingApi>#internal + 276
at 17 shared 0x00000001038d04f4 kfun:de.comp.proj.shared.models.GeofencingModel.$sendGeofencingDataCOROUTINE$51#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any? + 460
at 18 shared 0x00000001038d095c kfun:de.comp.proj.shared.models.GeofencingModel#sendGeofencingData(kotlin.collections.List<de.comp.proj.shared.entity.TrackingData>){} + 292
at 19 shared 0x00000001038cfda4 kfun:de.comp.proj.shared.models.GeofencingModel.$saveGeofencingDataCOROUTINE$50#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any? + 1668
at 20 shared 0x000000010345114c kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 560
at 21 shared 0x00000001035c7fd0 kfun:kotlinx.coroutines.internal#resumeCancellableWith__at__kotlin.coroutines.Continuation<0:0>(kotlin.Result<0:0>;kotlin.Function1<kotlin.Throwable,kotlin.Unit>?){0§<kotlin.Any?>} + 2556
at 22 shared 0x00000001035c8124 kfun:kotlinx.coroutines.internal#resumeCancellableWith$default__at__kotlin.coroutines.Continuation<0:0>(kotlin.Result<0:0>;kotlin.Function1<kotlin.Throwable,kotlin.Unit>?;kotlin.Int){0§<kotlin.Any?>} + 240
at 23 shared 0x00000001035f7bc0 kfun:kotlinx.coroutines.internal.shareableInterceptedResumeCancellableWith$lambda-0#internal + 232
at 24 shared 0x00000001035f7d78 kfun:kotlinx.coroutines.internal.$shareableInterceptedResumeCancellableWith$lambda-0$FUNCTION_REFERENCE$466.invoke#internal + 72
at 25 shared 0x00000001035f7edc kfun:kotlinx.coroutines.internal.$shareableInterceptedResumeCancellableWith$lambda-0$FUNCTION_REFERENCE$466.$<bridge-UNN>invoke(){}#internal + 68
at 26 shared 0x000000010345cdd4 WorkerLaunchpad + 192
at 27 shared 0x0000000103a7a330 _ZN6Worker19processQueueElementEb + 2364
at 28 shared 0x0000000103a7d980 Kotlin_Worker_processQueueInternal + 116
at 29 shared 0x000000010345f780 kfun:kotlin.native.concurrent.Worker#processQueue(){}kotlin.Boolean + 60
Caused by: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen de.comp.proj.shared.ktor.TrackingApi@82553128
at 0 shared 0x000000010343145c kfun:kotlin.Throwable#<init>(kotlin.String?){} + 96
at 1 shared 0x0000000103429750 kfun:kotlin.Exception#<init>(kotlin.String?){} + 92
at 2 shared 0x00000001034299c0 kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 92
at 3 shared 0x000000010345bca4 kfun:kotlin.native.concurrent.InvalidMutabilityException#<init>(kotlin.String){} + 92
at 4 shared 0x000000010345d0a0 ThrowInvalidMutabilityException + 336
at 5 shared 0x0000000103a6404c MutationCheck + 156
at 6 shared 0x00000001038b7e24 kfun:de.comp.proj.shared.ktor.TrackingApi#<init>(co.touchlab.kermit.Kermit){} + 472
at 7 shared 0x000000010385d720 kfun:de.comp.proj.shared.coreModule$lambda-8$lambda-2#internal + 652
at 8 shared 0x0000000103860754 kfun:de.comp.proj.shared.$coreModule$lambda-8$lambda-2$FUNCTION_REFERENCE$65.invoke#internal + 188
at 9 shared 0x000000010380ded0 kfun:org.koin.core.instance.InstanceFactory#create(org.koin.core.instance.InstanceContext){}1:0 + 860
at 10 shared 0x000000010380e840 kfun:org.koin.core.instance.SingleInstanceFactory#create(org.koin.core.instance.InstanceContext){}1:0 + 268
at 11 shared 0x000000010380ed0c kfun:org.koin.core.instance.SingleInstanceFactory.get$lambda-0#internal + 208
at 12 shared 0x000000010380edb8 kfun:org.koin.core.instance.SingleInstanceFactory.$get$lambda-0$FUNCTION_REFERENCE$244.invoke#internal + 72
at 13 shared 0x000000010380ef1c kfun:org.koin.core.instance.SingleInstanceFactory.$get$lambda-0$FUNCTION_REFERENCE$244.$<bridge-UNN>invoke(){}#internal + 68
at 14 shared 0x0000000103829608 kfun:org.koin.mp.KoinPlatformTools#synchronized(kotlin.Any;kotlin.Function0<0:0>){0§<kotlin.Any?>}0:0 + 232
at 15 shared 0x000000010380eae8 kfun:org.koin.core.instance.SingleInstanceFactory#get(org.koin.core.instance.InstanceContext){}1:0 + 364
at 16 shared 0x0000000103815cf4 kfun:org.koin.core.registry.InstanceRegistry#resolveInstance(kotlin.String;kotlin.Function0<org.koin.core.parameter.DefinitionParameters>?){0§<kotlin.Any?>}0:0? + 508
at 17 shared 0x000000010381f090 kfun:org.koin.core.scope.Scope.resolveInstance#internal + 840
at 18 shared 0x000000010381ecb8 kfun:org.koin.core.scope.Scope#get(kotlin.reflect.KClass<*>;org.koin.core.qualifier.Qualifier?;kotlin.Function0<org.koin.core.parameter.DefinitionParameters>?){0§<kotlin.Any?>}0:0 + 1860
at 19 shared 0x00000001038d3c38 kfun:de.comp.proj.shared.models.GeofencingModel.<init>$<anonymous>_1-1#internal + 800
at 20 shared 0x00000001038d4c30 kfun:de.comp.proj.shared.models.GeofencingModel.$<init>$<anonymous>_1-1$FUNCTION_REFERENCE$169.invoke#internal + 152
at 21 shared 0x000000010345da40 kfun:kotlin.native.concurrent.FreezeAwareLazyImpl.getOrInit#internal + 748
at 22 shared 0x000000010345e0e4 kfun:kotlin.native.concurrent.FreezeAwareLazyImpl#<get-value>(){}1:0 + 500
at 23 shared 0x00000001038ce674 kfun:de.comp.proj.shared.models.GeofencingModel.<get-trackingApi>#internal + 276
at 24 shared 0x00000001038d04f4 kfun:de.comp.proj.shared.models.GeofencingModel.$sendGeofencingDataCOROUTINE$51#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any? + 460
at 25 shared 0x00000001038d095c kfun:de.comp.proj.shared.models.GeofencingModel#sendGeofencingData(kotlin.collections.List<de.comp.proj.shared.entity.TrackingData>){} + 292
at 26 shared 0x00000001038cfda4 kfun:de.comp.proj.shared.models.GeofencingModel.$saveGeofencingDataCOROUTINE$50#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any? + 1668
at 27 shared 0x000000010345114c kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 560
at 28 shared 0x00000001035c7fd0 kfun:kotlinx.coroutines.internal#resumeCancellableWith__at__kotlin.coroutines.Continuation<0:0>(kotlin.Result<0:0>;kotlin.Function1<kotlin.Throwable,kotlin.Unit>?){0§<kotlin.Any?>} + 2556
at 29 shared 0x00000001035c8124 kfun:kotlinx.coroutines.internal#resumeCancellableWith$default__at__kotlin.coroutines.Continuation<0:0>(kotlin.Result<0:0>;kotlin.Function1<kotlin.Throwable,kotlin.Unit>?;kotlin.Int){0§<kotlin.Any?>} + 240
Rak
07/14/2021, 2:29 PMRobert Veres
08/12/2021, 7:32 AMMarkRS
08/12/2021, 3:49 PMMarkRS
08/13/2021, 2:36 PMMarkRS
08/20/2021, 1:14 PMMarkRS
09/30/2021, 1:15 PMRak
10/19/2021, 1:03 PMFailed to apply plugin ‘com.android.internal.application’.> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. You can try some of the following options: - changing the IDE settings. - changing the JAVA_HOME environment variable. - changing
org.gradle.java.home
in gradle.properties
.
JAVA_HOME is set to java 11 so not sure what to do. This is when i try to run from XCode.Rak
10/20/2021, 8:24 AMKirill Langer
10/20/2021, 4:29 PMld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/lib/darwin//libclang_rt.ios.a, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/lib/darwin//libclang_rt.ios.a (4 slices)
Any idea what this means? I have tried deleting and reinstalling Pods
with no success so far.Rak
10/21/2021, 1:22 PMRak
11/01/2021, 4:01 PMRak
11/02/2021, 9:58 AMRak
11/08/2021, 10:35 AMRak
11/09/2021, 4:36 PMRak
11/10/2021, 7:14 AMaiidziis
11/10/2021, 3:06 PMco.touchlab:kermit-crashlytics:0.1.9
published?
When trying to reference it I get: Could not GET '<https://kotlin.bintray.com/kotlinx/co/touchlab/kermit-crashlytics/0.1.9/kermit-crashlytics-0.1.9.pom>'. Received status code 403 from server: Forbidden
Or is it published in different repository?Rak
11/10/2021, 7:25 PMRak
11/16/2021, 8:23 AM// Revert to just ios() when gradle plugin can properly resolve it
still an issue?saket
11/16/2021, 4:50 PMYou must dispose of IsolateState instances to avoid memory leaks.
saket
11/16/2021, 4:50 PMYou must dispose of IsolateState instances to avoid memory leaks.
russhwolf
11/16/2021, 5:40 PMStableRef
inside StateHolder
, but I don't think any of the collections expose a way to clear it. Are you having specific issues or just looking for best practice? Kevin knows that stuff much better than me but he's on vacation.saket
11/16/2021, 6:35 PMAre you having specific issues or just looking for best practice?best practice! I've been using iso collections in my project but I never dispose them. I'm now thinking if that's something I should be doing. this discussion originally started here where I'm trying to convince @evant to use iso collections in kotlin-inject: https://github.com/evant/kotlin-inject/issues/167#issuecomment-970449637
russhwolf
11/16/2021, 6:47 PMfreeze()
calls that exist in your code. So that's probably why you still see InvalidMutabilityException
.saket
11/16/2021, 8:38 PM