Timothy Wong
05/30/2019, 8:55 AMTarget 'native' for platform linux_arm32_hfp is ignored during build on this macos_x64 machine. You can build it with a linux_x64 host.
Daniel Baird
05/30/2019, 10:32 PM__imp_UuidCreate'
This method exists in platform.windows. I'm assuming i'm just missing a linker flag, but I'm not sure how to determine what linker flag I need.
I have already added -luuid
. Any thoughts?Josh Feinberg
05/31/2019, 8:51 PMbuild.gradle
is in groovy
unable to resolve class org.jetbrains.kotlin.gradle.tasks.FatFrameworkTask
@ line 2, column 1.
import org.jetbrains.kotlin.gradle.tasks.FatFrameworkTask
russhwolf
06/01/2019, 4:33 AMw: Flag is not supported by this version of the compiler: -Xlibrary-to-cover=...
and the llvm commands fail because the profraw
file is never generated.ribesg
06/03/2019, 8:50 AM> Task :linkTestDebugExecutableIosSim
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_UIDevice", referenced from:
objc-class-ref in combined.o
ld: symbol(s) not found for architecture x86_64
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
Occurred after adding some imports for platform.UIKit.<stuff>
in a filecbruegg
06/03/2019, 7:10 PMlouiscad
06/03/2019, 7:23 PMdarkmoon_uk
06/03/2019, 8:44 PMpyryjook
06/04/2019, 6:11 AMbuild.gradle.kts
-file as follows:
macosX64 {
val lunchfinderMain by compilations.creating {
val coreLocation by cinterops.creating {
defFile(project.file("CoreLocation.def"))
packageName("platform.CoreLocation")
}
}
}
The file CoreLocation.def
is now located in the (default) path src/nativeInterop/cinterop/CoreLocation.def
When I run the build I get the same error as described in the ticket (the imported platform.CoreLocation
package not found).
Any suggestions on what might be wrong with my Gradle config? Thanks already in advance!spierce7
06/04/2019, 3:45 PMJosh Feinberg
06/04/2019, 9:46 PMDaniel Hauschildt
06/05/2019, 6:19 AMandreasmattsson
06/05/2019, 7:08 AM$flutterProjectDir/.iOS/Flutter/engine/
dir?pyryjook
06/05/2019, 7:57 AMprintln
is an unresolved reference in the Hello World example. Any suggestions on what would fix the problem?Thomas
06/05/2019, 9:54 AMTerminating app due to uncaught exception 'NSGenericException', reason: 'Only one Kotlin framework can be loaded currently'
terminating with uncaught exception of type NSException
Thomas
06/05/2019, 1:54 PMstruct MyStruct : KotlinInterface {
}
And in Kotlin:
interface KotlinInterface {
...
}
I tried this but it gives the following error:
Non-class type 'MyStruct' cannot conform to class protocol 'KotlinInterface'
ribesg
06/06/2019, 1:30 PMm
06/06/2019, 5:04 PM__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("A")))
@interface Lib_babylon_clientA : KotlinBase
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
- (void)b __attribute__((swift_name("b()")));
@end;
in .h file of generated .framework file. What could be the reason of Type 'A' has no member 'b'
Swift compilation error for A().b()
?Zh Efimenko
06/06/2019, 9:23 PMUtilsTests::class..getResource("/source.pst")
How can I get classpath?jimn
06/07/2019, 8:15 AMelizarov
06/07/2019, 9:21 PMkotlinx-io
. It is just not ready yet.pyryjook
06/08/2019, 6:39 AMextension
part in Kotlin.
lass LocationService: NSObject {
let locationManager: CLLocationManager
init(locationManager: CLLocationManager = CLLocationManager()) {
self.locationManager = locationManager
super.init()
self.locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters
self.locationManager.delegate = self
}
func getCurrentLocation() {
self.locationManager.requestLocation()
self.locationManager.requestWhenInUseAuthorization()
}
}
extension LocationService: CLLocationManagerDelegate {
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations:[CLLocation]) {
guard let location = locations.first else { return }
print("The location is: \(location)")
}
func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
print("Error: \(error)")
}
}
I do know that the original CLLocationManagerDelegate
protocol is actually interface with a name CLLocationManagerDelegateProtocol
on the Kotlin/Native side.
I tried googling, but did not find any examples on how to approach Swift extensions in Kotlin/Native. Any help would be highly appreciated, thanks!jeremy
06/08/2019, 11:44 PMjeremy
06/09/2019, 2:52 PMnapperley
06/10/2019, 1:35 AMZh Efimenko
06/10/2019, 7:18 AMenum class PropertyDataType{
P_TYP_INTEGER_16() {
override fun getData(byteArray: ByteArray): Int {
...
}
}
}
kotlin compile throw exception: e: Compilation failed: Could not find serialized descriptor for index: -7412938954638445921 com.tullynore.pst.domain.dictionary,PropertyDataType.P_TYP_INTEGER_16,<init>
* Source files: FolderTests.kt, MessageTests.kt, UtilsTests.kt
* Compiler version info: Konan: 1.2.1 / Kotlin: 1.3.31
* Output kind: PROGRAM
e: java.lang.IllegalStateException: Could not find serialized descriptor for index: -7412938954638445921 com.tullynore.pst.domain.dictionary,PropertyDataType.P_TYP_INTEGER_16,<init>
Maybe someone already had such an exception? Who can help me?Rohan Maity
06/10/2019, 1:23 PMbin
folder to PATH. But when try to run hello.kt
by kotlinc-native hello.kt
. I get exception: java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.read1(BufferedReader.java:210)
at java.io.BufferedReader.read(BufferedReader.java:286)
at java.io.Reader.read(Reader.java:140)
at java.util.Properties$LineReader.readLine(Properties.java:434)
at java.util.Properties.load0(Properties.java:353)
at java.util.Properties.load(Properties.java:317)
at org.jetbrains.kotlin.konan.properties.PropertiesKt.loadProperties(Properties.kt:28)
at org.jetbrains.kotlin.konan.target.Distribution$properties$2.invoke(Distribution.kt:67)
at org.jetbrains.kotlin.konan.target.Distribution$properties$2.invoke(Distribution.kt:24)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.jetbrains.kotlin.konan.target.Distribution.getProperties(Distribution.kt)
at org.jetbrains.kotlin.konan.target.PlatformManager.<init>(Platform.kt:36)
at org.jetbrains.kotlin.konan.target.PlatformManager.<init>(Platform.kt:32)
at org.jetbrains.kotlin.backend.konan.KonanConfig.<init>(KonanConfig.kt:36)
at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:59)
at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:35)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:84)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:42)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:103)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:81)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:49)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:214)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:206)
at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:217)
at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:208)
at org.jetbrains.kotlin.konan.util.UtilKt.profileIf(Util.kt:39)
at org.jetbrains.kotlin.konan.util.UtilKt.profile(Util.kt:33)
at org.jetbrains.kotlin.cli.bc.K2Native$Companion.main(K2Native.kt:210)
at org.jetbrains.kotlin.cli.bc.K2NativeKt.main(K2Native.kt:296)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:16)
And this is my hello.kt file fun main(){
println("hello native")
}
Kruger Brent
06/10/2019, 3:42 PMFalseHonesty
06/10/2019, 4:26 PMstruct nk_context ctx;
nk_init_fixed(&ctx, calloc(1, MAX_MEMORY), MAX_MEMORY, &font);
This is some C code for the library I'm trying to use (Nuklear). How would I convert that to Kotlin interop code?Marc Knaup
06/11/2019, 4:47 PMMarc Knaup
06/11/2019, 4:47 PMbasher
06/11/2019, 6:11 PM