Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolved reference: swift #4

Open
chenxi92 opened this issue Mar 31, 2023 · 1 comment
Open

Unresolved reference: swift #4

chenxi92 opened this issue Mar 31, 2023 · 1 comment

Comments

@chenxi92
Copy link

chenxi92 commented Mar 31, 2023

I download the repo and run the ./gradlew build it failed and the error was:

e: file:///Users/peak/Downloads/playground-SwiftLib-in-KMMLib-main/src/iosMain/kotlin/ChachaPolyIos.kt:5:8 Unresolved reference: swift
e: file:///Users/peak/Downloads/playground-SwiftLib-in-KMMLib-main/src/iosMain/kotlin/ChachaPolyIos.kt:9:17 Unresolved reference: DataResult
e: file:///Users/peak/Downloads/playground-SwiftLib-in-KMMLib-main/src/iosMain/kotlin/ChachaPolyIos.kt:21:20 Unresolved reference: SwiftChachaPoly
e: file:///Users/peak/Downloads/playground-SwiftLib-in-KMMLib-main/src/iosMain/kotlin/ChachaPolyIos.kt:34:20 Unresolved reference: SwiftChachaPoly

I already run the kdoctor command, everything is OK.

Below is my compile environment:

  • Android Studio Electric Eel | 2022.1.1 Patch 2
  • macOS Monterey: 12.6.3
  • Xcode 14.2
  • openjdk version "11.0.15" 2022-04-19

I search on google and can't find the solution.
It seems the compiler can't find the exported .klib file.
After executing ./gradlew build even though it failed, I find the KMChachaPoly-cinterop-SwiftChachaPoly.klib files under the build/libs/iosArm64/main/ and build/libs/iosX64/main/.

I'm new to Android development and I'm confused about how Android Studio linked the .klib file to the shared project.

@chenxi92 chenxi92 changed the title Unresolved reference: seift Unresolved reference: swift Apr 3, 2023
@AbdelrahmanEsam
Copy link

same here did you find any solution bro ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants