android - 无法启动 Kotlin REPL : CommandLineWrapper is ill-suited for launching apps

标签 android android-studio kotlin android-studio-arctic-fox

我正在尝试在 Android Studio 中使用 Kotlin REPL。
但是,当我打开它时,我得到以下输出:

"E:\Program Files\Android\Arctic Fox\android-studio\jre\bin\java.exe" -Dkotlin.repl.ideMode=true -Dfile.encoding=UTF-8 -classpath "E:\Program Files\Android\Arctic Fox\android-studio\lib\idea_rt.jar;C:\Users\me\AppData\Local\Temp\classpath901685403.jar" com.intellij.rt.execution.CommandLineWrapper C:\Users\me\AppData\Local\Temp\classpath901685403.jar org.jetbrains.kotlin.cli.jvm.K2JVMCompiler
`CommandLineWrapper` is ill-suited for launching apps on Java 9+.
If the run configuration uses "classpath file", please change it to "@argfile".
Otherwise, please contact support.

Process finished with exit code 1
我能找到的最接近的解决方案是这个:
Test framework quit unexpectedly - ClassNotFound Exception
这建议更改运行配置中的值,但是似乎没有可用于 REPL 的运行配置。
“Java Scratch”有一个,但是改变它并不能解决问题。
我正在使用带有 Kotlin 插件版本 203-1.5.20-release-289-AS7717.8 的北极狐 Beta(2020.3.1 Beta 5)。

最佳答案

保持 REPL 窗口显示上述错误,再次选择
工具 > Kotlin > Kotlin REPL
一个选项显示有两个项目
(项目)
(项目).app
选择带有项目名称的第一个选项,REPL 开始工作。
error message
option after selecting Kotlin REPL again
correctly running REPL

关于android - 无法启动 Kotlin REPL : CommandLineWrapper is ill-suited for launching apps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68352557/

相关文章:

android - 在 Fragment 中创建 AlarmDialog

java - 如何在 WebView Android Studio 中打开本地 pdf 文件

android - SDK platform-tools 版本(24.0.4)太旧,无法检查使用API​​ 25编译的API;请更新

android - Android 3.5.3 上的 "Kotlin not configured"错误

java - 我安装了 Android Studio,但无法通过命令行访问 gradle

Android数据绑定(bind)问题: "Cause: couldn' t make a guess for"

android - 为什么异步设置 View 尺寸在 Kotlin 中不起作用?

java - android 中使用 RecyclerView 的聊天应用程序

android - Xamarin PCLStorage 包 : What is the root folder this PCLStorage reference to

kotlin - 在jetpack compose中将默认方向设置为横向?