-
Notifications
You must be signed in to change notification settings - Fork 1k
Android Studio doesn't understand SharedCode module in mpp-iOS-Android #96
Comments
@jonnyzzz, if there's anything I can help to investigate, let me know. What I'm doing as a workaround for now is using the "Project" view in Android Studio, which lets me access the I also changed Shout out to @PeeJWeeJ for helping me find a workaround. |
It does not work for me too. Please follow the issue for Kotlin MPP. I was able to compile the project (no matter there were the errors in the editor), did you? |
That's correct; I can compile the project. The static analysis is limited, but the workaround I mentioned has been helpful. |
The original problem with the tooling is not yet fixed. You may watch for the |
Thanks @jonnyzzz |
For my part, I just needed to add the dependency to the
Then sync your gradle, and your references should now resolve. |
Misreading the above advice, I instead added |
I also ran into where the |
The mpp-iOS-Android doesn't quite work in the latest Android Studio. It builds without errors, and I am able to run it on an Anrdoid device, but the common code can't be edited inside Android Studio. Right now, I'd have to edit the Kotlin source in a basic text editor.
The attached screenshot shows how the
SharedCode_commonMain
doesn't show the common source files, resulting in thecreateApplicationScreenMessage
function being unrecognized.Steps to reproduce:
SharedCode_commonMain
module doesn't have any source code listedapp/src/main/java/com/jetbrains/jonnyzzz/myapplication/MainActivity.kt
and note that Android Studio doesn't know where thecreateApplicationScreenMessage
function comes from, so it thinks it's an errorThe text was updated successfully, but these errors were encountered: