简体   繁体   English

Android Studio:无法运行程序“node”

[英]Android Studio: Cannot run program "node"

I have project in React Native, and I'm not being able to build on the Android Studio due the following error.我在 React Native 中有项目,但由于以下错误,我无法在 Android Studio 上构建。

Here's the detailed log with additional info:这是带有附加信息的详细日志:

java.io.IOException: Cannot run program "node" (in directory "/Users/fabioernanni/git/fintech-ewallet-mobile/android"): error=2, No such file or directory

java.io.IOException: error=2, No such file or directory

Cause: error=2, No such file or directory

I have tried to reinstall Node, Android Studio, to link the tscript library so the Android Studio would recognize the "node" but nothing seems to help.我尝试重新安装 Node,Android Studio,以链接 tscript 库,以便 Android Studio 可以识别“节点”,但似乎无济于事。

I have a similar problem with Android Studio (bumble bee) version with node on My Mac M1 Chip so to solve this open your Android Studio from terminal .我的 Android Studio(大黄蜂)版本在我的 Mac M1 芯片上有节点,所以要解决这个问题,请从终端打开 Android Studio。 To Open Android Studio from terminal on Mac m1 just open your Terminal and paste the following command要在 Mac m1 上从终端打开 Android Studio,只需打开终端并粘贴以下命令

open -a /Applications/Android\ Studio.app

this will open your android studio and then you can open your project and can run build from android studio Note : be sure that Android studio is not running state if its running just Quite it and then launch from Terminal这将打开您的 android 工作室,然后您可以打开您的项目并可以从 android 工作室运行构建注意:确保 Android 工作室没有运行 state 如果它正在运行,然后从终端启动

Do these steps to solve it:-执行以下步骤来解决它:-

STEP 1: First quit the android studio, if it is in a running state. STEP 1:先退出android studio,如果是在运行state。

command + Q

STEP 2: Enable the permission for android studio printenv.第 2 步:启用 android studio printenv 的权限。

sudo chmod +x /Applications/Android\ Studio.app/Contents/bin/printenv

STEP 3: Open android studio from terminal app.第 3 步:从终端应用程序打开 android 工作室。

open -a /Applications/Android\ Studio.app

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

相关问题 Android Studio未构建无法运行程序 - android studio doesnt build cannot run program 无法在ubuntu的android studio上运行程序sdk路径 - Cannot run program sdk path on android studio on ubuntu 无法在 Android Studio 上运行程序 flutter.bat - Cannot run program flutter.bat on Android Studio 运行我的程序时,Android Studio无法找到设备 - Android studio cannot find device when I run my program React Native on Android:无法运行程序“节点”:错误=2,没有这样的文件或目录 - React Native on Android: Cannot run program "node": error=2, No such file or directory Android Studio错误➡无法运行程序“ git” ... CreateProcess错误= 2,系统找不到指定的文件 - Android Studio error ➡ Cannot run program “git” … CreateProcess error=2, The system cannot find the file specified java.io.IOException: 无法运行程序 CreateProcess 错误=2,系统找不到在 android studio 上指定的文件 - java.io.IOException: Cannot run program CreateProcess error=2, The system cannot find the file specified on android studio 无法在Android Studio中运行项目 - Cannot run project in Android Studio 无法在Android Studio中运行后端 - Cannot run backend in Android Studio Android Studio,无法运行模拟器 - Android Studio, Cannot run Emulator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM