简体   繁体   English

Kotlin Scratch File Android Studio readline()

[英]Kotlin Scratch File Android Studio readline()

Can I use readline() in a Scratch File of Android Studio?我可以在 Android Studio 的 Scratch 文件中使用readline()吗? Where to enter input?在哪里输入?

I'm showing an example of how to do it on Intellij IDEA, however the steps would remain the same for Android Studio too, as it's built on Intellij itself.我正在展示一个如何在 Intellij IDEA 上执行此操作的示例,但是 Android Studio 的步骤也将保持不变,因为它是基于 Intellij 本身构建的。

You can run the scratch file by right clicking on the scratch file editor and selecting Run 'scratch.kts' (would show the name of the current scratch file).您可以通过右键单击临时文件编辑器并选择运行“scratch.kts” (将显示当前临时文件的名称)来运行临时文件。

在此处输入图片说明

That would run the scratch file and show on the console in the Run tab below, where you can enter the input for readline() .这将运行暂存文件并显示在控制台下面的 Run 选项卡中,您可以在其中输入readline()的输入

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM