https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
v

vmichalak

05/07/2019, 3:04 PM
During my Kotlin MPP (Android / iOS) build i have a strange issue during the 'linkTestDebugExecutableIos' task. (more info in reply to this post) Do you have an idea to correct this?
Gradle issue:
Copy code
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
Gradle version: 5.1.1 Kotlin version : 1.3.31 Coroutines version : 1.2.1 Ktor version: 1.1.5 Kotlinx.Serialization version: 0.11.0
s

svyatoslav.scherbina

05/08/2019, 7:29 AM
Do you use
UIDevice
class in your test sources? Do you use it in main sources?
h

Hauke Radtki

05/08/2019, 9:35 AM
Suffering the same issue after upgrading from Kotlin 1.3.20 to 1.3.31. For me its happening for the arm64 target. I'm not using UIDevice anywhere in my codebase.
Okay, for me it was just a rogue unused import of Framework.UIKit.* that caused this. As I'm not using UIKit its not an issue for me, but shouldn't this work in general?
v

vmichalak

05/09/2019, 12:35 PM
I don't use UIDevice in my tests :(
I finally recreate the project from scratch and it works ... I don't understand why but ... It's ok :3
👍 1
s

svyatoslav.scherbina

05/13/2019, 8:26 AM
@Hauke Radtki thanks, confirmed.
g

gonzooin

06/03/2019, 9:14 AM
@vmichalak What did you mean by recreate the project ? I tried to delete/reclone my project but it didn't FIX anything.
v

vmichalak

06/04/2019, 9:31 AM
I just destroy et recreate from scratch ^^"
4 Views