what is the simplest way to run code that is insid...
# multiplatform
w
what is the simplest way to run code that is inside commonMain without running the consuming app (but using the class path specific in my kmp project) from the terminal or inside Android Studio? If I put in a main function, AS puts a green arrow next to it, but clicking that just shows “nothing here”. I’ve tried making a class with a main function in my androidMain source, and I can configure a Run Configuration for that, but when I run it I just get a ClassNotFoundException.
j
Add a JVM or JS+node target
Then the pkay button should work (by promting which target you want to run)
w
thx @jw. Are you saying I need to add this JVM target (JRE) to the androidMain Run Configuration or the one pointing to commonMain?
ah, nvm. Added
jvm()
to the
kotlin  {}
block in the gradle file.
👍 1