Where is the output pane?

I’m completely new on Kotlin and can’t find the output panel … Sorry for asking so silly, but I have a lot of desire to learn, I follow the “Android Developer” learning line and with his exercises I cannot make him throw me the correct exercise … some Wozniak Soul that wants to help a mortal please …

What happens when you click the run button on the script? (The second green button, the one directly below the file text “activity_main.xml” in your screenshot and more to the left than the other).

There should be a pane on the bottom called “run”. If you’re clicking the run button on the top, it seems you have it set to run “Pixel 3 API 28”. This wouldn’t run your script file (notice the drop-down for more settings). When in doubt, use the run button inside your file.

PS I haven’t gone through the android developer tutorials so I’m not sure if it differs for Android studio with a fresh install.

2 Likes

Hello, thank you very much for answering, I appreciate it, you are correct, regarding running it in the “Pixel 3 API 28” emulator. This is ultimately what I want to avoid, trying to always run the emulator- and that the program is run in the out mode … For this I read more in this tutorial, https://kotlinlang.org/docs/tutorials/quick-run.html#scratches-and-worksheets-- where “scratch” files are used but I still can’t get an answer in the panel, except for the "fun main: unit- I’ll keep investigating thank you very much for the help.

kt is the extension of the Kotlin files, instead kts is the extension for Kotlin Script.
A Kotlin file (kt) usually require a main for entry point, instead Kotlin Script doesn’t require it.

You defined a function (main) inside a script, so the script define the function but does it not run that.

Try to comment (//) rows 1 and 17 :wink:

Instead, if you wish use a Kotlin source file (kt), start a test project (not Android) or play on play.kotlinlang.org/

1 Like

Finally, thank you very much, yes my whole problem was knowing the communication of different files,( kt and kts), in addition to corroding them in different physical platforms and emulators. Since yesterday I did different tests and I was advancing in my classes, but with your help the chapter was clear.


Which class/course are you taking if you dont mind? Looks like Kotlin really starts to be picked up in universities.

1 Like

hEllo hEllo, with pleasure I pass you the link: Kotlin y Android  |  Desarrolladores de Android  |  Android Developers
I am 37 years old- and I did not go to university, I can not know what you are talking about, “excuse me”. I learn in a self-taught way.

1 Like