Ferran
11/11/2020, 9:53 AMdan.the.man
11/11/2020, 4:20 PMjava.security.cert.CertificateException: Domain specific configurations require that hostname aware checkServerTrusted(X509Certificate[], String, String) is used
but I can make the exact same request with retrofit no problem, it's a simple GET and works in a browser/postman etcAlex Anisimov
11/12/2020, 3:29 PMrsetkus
11/12/2020, 4:06 PMCould not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve xx.yy.mpp:kommon-android:0.0.1.
Required by:
project :app
> No matching variant of xx.yy.mpp:kommon-android:0.0.1 was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
- Variant 'android-releaseApiElements' capability xx.yy.mpp:kommon-android:0.0.1 declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
- Variant 'android-releaseRuntimeElements' capability xx.yy.mpp:kommon-android:0.0.1 declares a runtime of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
- Variant 'metadata-api' capability xx.yy.mpp:kommon-android:0.0.1:
- Incompatible because this component declares a usage of 'kotlin-metadata' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
- Other compatible attribute:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
- Variant 'metadata-commonMainMetadataElements' capability xx.yy.mpp:kommon-android:0.0.1:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
- Other compatible attribute:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
Feeling it is more maven-publish
plugin issue but since it is KMP project I thought somebody else has faced with the same issue.Patrick Doering
11/12/2020, 7:50 PMwilliam
11/12/2020, 9:09 PMSebastien Leclerc Lavallee
11/12/2020, 9:34 PMspec.version = 'unspecified'
which is not OK for Cocoapods and we need to set a version.
I did set the version manually but for some reason, when executing Fastlane to bundle and upload my app, the shared:podspec
task is executed. I don’t exactly where and why it’s executed, I’m still trying to figure it out. But I would prefer to have a way to set it by code inside my gradle file.
Thanks 🙂Lukasz Kalnik
11/13/2020, 10:57 AMFerran
11/13/2020, 11:29 AMSharedFlow
is available from org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1
? if not, which dependency shall I add for the commonMain
sourceset?Hauke Radtki
11/13/2020, 12:42 PMexpect
an extension function that is available on some targets and not on others.
E.g.: File.readBytes():ByteArray
is defined in jvm but not on native. So I want to have an actual expression that references the existing extension function (located in <http://kotlin.io|kotlin.io>
) for jvm and roll my own implementation for native targets.Slackbot
11/13/2020, 3:10 PMElka
11/13/2020, 4:16 PMiosArm32
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
I am getting Gradle import errors
and the IDE is not recognizing anything (no code highlighting, no code navigation…)
The error is
Unable to build Kotlin project configuration
Details: java.lang.reflect.InvocationTargetException: null
Caused by: java.lang.IllegalStateException: Couldn't resolve metadata artifact for ModuleDependencyIdentifier(groupId=org.jetbrains.kotlinx, moduleId=kotlinx-coroutines-core) in configuration ':shared:iosArm32CompileKlibraries'
HOWEVER, when I don’t use the coroutines-native-mt branch the gradle configuration works fine.
implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-core:$versions.coroutines") {
version {
strictly '1.3.9-native-mt'
}
}
Daniele B
11/13/2020, 5:19 PMJide
11/14/2020, 8:15 AMAndrew
11/15/2020, 3:56 AMDr.jacky
11/15/2020, 2:59 PMNov 14 19:52:22 Drjacky-MacBookPro ios[11152]: assertion failed: 20B29 18B79: libxpc.dylib + 50260 [BDCDB527-0E34-3346-8444-E8CEEF0377ED]: 0x7d
Nov 14 19:52:22 Drjacky-MacBookPro http://com.apple.CoreSimulator.SimDevice.623058DA-0F47-4361-BDE0-4F9E80184FF0[11005] (UIKitApplication:app.web.drjackycv.ios.debug[2196][rb-legacy][11152]): Service exited with abnormal code: 1
Nov 14 19:52:23 Drjacky-MacBookPro ios[11153]: assertion failed: 20B29 18B79: libxpc.dylib + 50260 [BDCDB527-0E34-3346-8444-E8CEEF0377ED]: 0x7d
Nov 14 19:52:23 Drjacky-MacBookPro http://com.apple.CoreSimulator.SimDevice.623058DA-0F47-4361-BDE0-4F9E80184FF0[11005] (UIKitApplication:app.web.drjackycv.ios.debug[96f0][rb-legacy][11153]): Service exited with abnormal code: 1I’ve set all library version to the ones that use kotlin 1.4.0. I thought maybe this is the reason but, didn’t help. For example:
reactiveVersion=1.1.17
ktorVersion=1.4.0
kotlinVersion=1.4.0
kodeinVersion=7.1.0
plugings { kotlin("plugin.serialization") version "1.4.0"
Azur Haljeta
11/15/2020, 4:19 PMwilliam
11/15/2020, 7:09 PMSkolson5903
11/15/2020, 8:44 PMSantiago Avila
11/15/2020, 11:27 PMNative interop types constructors must not be called directly
in line 34, does anyone knows how can I fix it? Thanks!xiaobailong24
11/16/2020, 5:01 AMankushg
11/16/2020, 7:59 PMinterface
from Kotlin which declares `suspend fun`s (or some other async construct), and have an iOS app app directly implement the interface in Swift, rather than implementing it through KMP?
Our mobile data layers are currently platform-specific and have a ton of moving parts. It's definitely not a short-term project to convert them to KMP (and we're not sure if we would ever really want to).
We do however want to migrate more logic into KMP! We were hoping there's a way to:
• define KMP interfaces for Use Cases/Interactors,
• implement those interfaces using our (non-KMP) data layers in iOS/Android, and then
• constructor-inject those Use Case implementations into a KMP ViewModel, using them from common code
Anyone have any insight?German Politov
11/17/2020, 1:01 PMAndroid
, iOS
and JS
? I've already successfully developed KMP targeting Android and iOS with simple shared code that makes API call to Google Photos endpoint and shows fetched photos in the apps on both platforms(Android/iOS), now I want to add JS support to the project by creating a simple JS(or React) page that will use that shared code also. Please share the links to repositories or documentation how to combine three targets in one KMP if you know such.Daniele B
11/17/2020, 3:05 PMUmar Ata
11/17/2020, 5:55 PMHi there,
I have a method in commonMain in SharedClass
@Throws(Exception::class)
fun feed(value: DoubleArray) {
..
}
and it inputs DoubleArray and I can pass that without any issues from Android Kotlin project but in iOS there is no such data type and I have
let floatArray1 = Array(UnsafeBufferPointer(start: buf.floatChannelData![1], count:Int(buf.frameLength)))
but I cannot pass it to my method in commonMain
so for this I created another method in Kotlin in which first I convert the float array in swift to NSMutable String array then pass it to that method and in that method I create a DoubleArray and then initialise in ForEachIndex loop
@Throws(Exception::class)
fun getDoubleArrayFromStringList(doubleArray: ArrayList<String>, printLog: Boolean?): DoubleArray {
if (printLog == true) println("given array:$doubleArray")
val signal = DoubleArray(doubleArray.count())
doubleArray.forEachIndexed { index, str ->
val doubleValue = (str.toDouble())
signal[index] = doubleValue
}
if (printLog == true) println("converted array:${signal.contentToString()}")
return signal
}
Is there any easy solution for my problem
Elnur Jeksenov
11/18/2020, 5:17 AMRhony
11/18/2020, 10:38 AMDaniele B
11/18/2020, 12:52 PMAzur Haljeta
11/18/2020, 3:08 PMpackForXcode
task and instead use cocoapods. And I also want to be able to add iOS-specific libraries directly into build.gradle.kts
, like AFNetworking. I know that this is possible and doable but...
Is there a complete example out there?
I've tried the following but there ae always some issues...Oleh
11/18/2020, 4:11 PMKtor native HttpClient requires kotlinx.coroutines version with 'native-mt' suffix (like '1.3.9-native-mt'). Consider checking the dependencies.
message? I’m using 1.4.1 ktor
in the multiplatform project?Oleh
11/18/2020, 4:11 PMKtor native HttpClient requires kotlinx.coroutines version with 'native-mt' suffix (like '1.3.9-native-mt'). Consider checking the dependencies.
message? I’m using 1.4.1 ktor
in the multiplatform project?John O'Reilly
11/18/2020, 4:15 PMnative-mt
version of Kotlinx Coroutines and unfortunately that's only available for 1.3.9 right now (though hope I think is that 1.4.1 version will be available this week)Oleh
11/18/2020, 4:18 PMJohn O'Reilly
11/18/2020, 4:18 PMOleh
11/18/2020, 4:24 PM