Android Studio 设置用于构建的节点目录(原因:错误 = 2,没有此类文件或目录)
2022-09-03 08:26:28
我的项目生成失败,因为它使用不正确的目录来运行 Node。如何为这些编译时任务设置 Node 目录?
具体任务是:
app:recordFilesBeforeBundleCommandDebug
以及相关的错误:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:recordFilesBeforeBundleCommandDebug'.
Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'node''
Caused by: net.rubygrapefruit.platform.NativeException: Could not start 'node'
Caused by: java.io.IOException: Cannot run program "node" (in directory "/Users/me/Code/appname/android/app"): error=2, No such file or directory
Caused by: java.io.IOException: error=2, No such file or directory