问题描述
我可以在 Android Studio 的 Scratch 文件中使用 readline()
吗?在哪里输入?
Can I use readline()
in a Scratch File of Android Studio?Where to enter input?
推荐答案
我正在展示如何在 Intellij IDEA 上执行此操作的示例,但是 Android Studio 的步骤也将保持不变,因为它是基于 Intellij 本身构建的.
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.
您可以通过右键单击临时文件编辑器并选择运行 'scratch.kts'(将显示当前临时文件的名称)来运行临时文件.
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).
这将运行暂存文件并显示在控制台下方的运行"选项卡中,您可以在其中输入 readline()
的输入.
That would run the scratch file and show on the console in the Run tab below, where you can enter the input for readline()
.
这篇关于Kotlin Scratch File Android Studio readline()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!