gpt4 book ai didi

java - 任务 ':app:compileDebugKotlin' java.io.IOException 执行失败

转载 作者:行者123 更新时间:2023-12-01 18:34:35 24 4
gpt4 key购买 nike

我不知道我是如何陷入这个困境的,但我认为问题出在Java二进制路径上......来自flutter doctor的路径与异常中的路径不同。当我运行现有项目或创建新项目并尝试运行它时,它仍然会给出相同的错误。

e: java.io.IOException: Cannot run program "C:\Program Files\Android\Android Studio\jre\jre\bin\java" (in directory "C:\Users\Acer\AppData\Local\kotlin\daemon"): CreateProcess , The system cannot find the file specified FAILURE: Build failed with an exception. * What went wrong:

Execution failed for task ':app:compileDebugKotlin'.

java.io.IOException: Cannot run program "C:\Program Files\Android\Android Studio\jre\jre\bin\java": CreateProcess error=2, The system cannot find the file specified

flutter 医生-v

[√] Flutter (Channel stable, v1.12.13+hotfix.7, on Microsoft Windows [Version 6.3.9600], locale en-US)
• Flutter version 1.12.13+hotfix.7 at C:\src\flutter
• Framework revision 9f5ff2306b (10 days ago), 2020-01-26 22:38:26 -0800
• Engine revision a67792536c
• Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\Acer\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.

[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code, 64-bit edition (version 1.41.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.8.0

[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5556 • android-x86 • Android 10 (API 29) (emulator)

出现这个问题后,我尝试通过以下方式解决它:

最佳答案

杀死所有有关 OpenJDK 进程,然后在文件夹“C:\Program Files\Android\Android Studio\jre\”中,删除 jre 文件夹并重新启动代码编辑器

关于java - 任务 ':app:compileDebugKotlin' java.io.IOException 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60084192/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com