Kris Wong
12/02/2020, 4:42 PM> Cannot find a version of 'org.jetbrains.kotlinx:kotlinx-coroutines-core' that satisfies the version constraints:
Dependency path 'TelemetrySampleAndroid:app:unspecified' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
Dependency path 'TelemetrySampleAndroid:app:unspecified' --> 'com.airwatch.act:TelemetryModule:1.0.0' --> 'com.airwatch.act:TelemetryModule-android-debug:1.0.0' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:{strictly 1.4.2-native-mt}'
anyone have a workaround for this?Forrest Pangborn
12/02/2020, 9:42 PMmultiplatform
type from jvm
or com.android.library
.
This has been working alright, but I recently ran into a problem when when I tried to introduce a dependency on a multiplatform
module (with a jvm
target) in a jvm
module; Android Studio fails to resolve classes defined in the commonMain
sourceset of the multiplatform
module while inside the jvm
module. However, everything compiles and packages fine from CLI so I'm wondering if this is an Android Studio bug.
I have a sample project exhibiting this - but am wondering if this a known limitation or if anyone else has experienced this before.Slackbot
12/02/2020, 11:32 PMPhilip Dukhov
12/03/2020, 2:12 AMvar test: Test?
weak var testW: Test?
func f() {
testW = Test()
print(testW) // non nil, unlike Swift class instance.
DispatchQueue.main.async { [weak self] in
print(self?.testW) // now nil, kind of ok
}
}
func f() {
test = Test()
testW = test
DispatchQueue.main.async { [weak self] in
self?.test = nil
}
DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
print(self?.testW) // not nil, seems it's not gonna be released, we have a leak
}
}
Why in the second case it not get’s release at all? It shouldn’t be captured by the block.. How can I release a kotlin object?Philip Dukhov
12/03/2020, 7:47 AMIncorrectDereferenceException: illegal attempt to access non-shared ...
the object is created in commonMain
part of the code, on a background thread.
if I switch to main thread on kotlin part it works fine. but if I switch on iOS one, this crash occurs on access to the object.
looks like freeze()
is only available from ios part. Or am I missing some imports?
How can I freeze an object in common code?Devendra Patel
12/03/2020, 5:27 PMaleksey.tomin
12/04/2020, 4:08 AMnrobi
12/04/2020, 8:00 AMLena Stepanova
12/04/2020, 9:40 AMreturn "Unable to download breed list"
in code, I want to write something similar to android's return getString(R.string.download_error)
, so that it's easier to edit those strings in one common fileElyes Ben Salah
12/04/2020, 11:57 AMJoost Van Wynen
12/04/2020, 1:20 PMjava.lang.IncompatibleClassChangeError: Found class org.jetbrains.kotlin.ir.declarations.IrModuleFragment, but interface was expected
. I think it has something to do with incompatible versions of Kotlin or some dependency, so I am trying to follow the example given by the KMM sample docs. Does anyone know which direction to look for a fix?SrSouza
12/04/2020, 5:04 PMFanis Paschos
12/05/2020, 12:12 AMSourabh Rawat
12/05/2020, 6:20 AMkotlin {
targets {
jvm {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
}
}
and
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
}
Ravin Jain
12/05/2020, 6:26 AMimport cocoapods.<libraryname>.*
but its not able to find the library.
Also when i build using ./gradlew build
getting error
at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:152)
at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesASTFiles(ModuleSupport.kt:68)
at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesInfo(ModuleSupport.kt:14)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.buildNativeLibrary(main.kt:507)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:265)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:73)
at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:19)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:41)
Any help ?Daniele B
12/05/2020, 1:57 PMPaul Woitaschek
12/07/2020, 8:37 AMСоловьев Георгий
12/07/2020, 10:29 AMkotlinMultiplatform
MavenPublication? I have a android project :cabinet, that depends on multiplatfom project :cabinetcore through api project(':cabinetcore')
. When I try to publish :cabinet I've got this error. I don't need kotlinMultiplatform
publication, only release
(which is mine publication). How can I disable its automatic creation?Daniele B
12/07/2020, 2:12 PMDaniele B
12/07/2020, 6:26 PMAmritansh
12/07/2020, 7:49 PMExecuting of 'pod gen --platforms=ios --gen-directory=/Users/atripathi/<Project Root>/shared/build/cocoapods/synthetic/iosArm64 dogtag.podspec' failed with code 1 and message:
[!] Unknown command: `gen`
Did you mean: env?
cocoapods {
frameworkName = "shared"
pod("Connectivity")
}
I should also specify here that the first step mentioned here https://kotlinlang.org/docs/reference/native/cocoapods.html#install-the-cocoapods-dependency-manager-and-plugin is failing for me when I run the command so I used`brew install cocoapods`
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.13.1/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20201207-63679-1jx757c.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.13.1 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ffi-1.13.1/gem_make.out
my project is working fine on iOS when I remove pod() dependency. I am kind of confused here where things are going wrongAlex
12/07/2020, 8:26 PMJavier
12/08/2020, 12:30 AMPaul Woitaschek
12/08/2020, 7:41 AMBoth watchos-armv7k and watchos-arm64_32 represent two equivalent library definitions.
We're building the framework like this:
xcodebuild -create-xcframework \
-framework ios/build/xcode-frameworks/iosArm64/SharedCode.framework \
-framework ios/build/xcode-frameworks/iosX64/SharedCode.framework \
-framework ios/build/xcode-frameworks/watchosArm64/SharedCode.framework \
-framework ios/build/xcode-frameworks/watchosX86/SharedCode.framework \
-framework ios/build/xcode-frameworks/watchosArm32/SharedCode.framework \
-output "$XCFRAMEWORK_DESTINATION_DIR"/SharedCode.xcframework
Did someone manage to get arm32 and arm64 working together for kotlin native on ios / watchos?aiidziis
12/08/2020, 12:14 PMSQLCipher
? Went through example: https://github.com/touchlab-lab/KaMPKitSQLCipher . Project actually builds on Xcode and works properly, but now I am having problems with publishToMavenLocal
.
When I run gradlew publishToMavenLocal
this error is getting thrown:
Execution failed for task ':KME:cinteropSQLCipherIos'.
> Cannot perform cinterop processing for module SQLCipher: cannot determine headers location.
Daniele B
12/08/2020, 2:54 PMHamza GATTAL
12/08/2020, 10:48 PMyshrsmz
12/09/2020, 8:36 AMSrSouza
12/09/2020, 12:42 PMAmritansh
12/09/2020, 11:56 PMNWPathMonitor
in Network but it was not resolved even after I imported import platform.Network.*
. Is this something not available for ios on KMP? https://developer.apple.com/documentation/network/nwpathmonitor