I am trying to run one project in react native, but i am getting the next error
:ReactNative:Running '[node, -e, console.log(require('react-native/cli').bin);]' command failed.
FAILURE: Build failed with an exception.
- Where: Script '/Users/test/Documents/testA/react/app-test/test/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 179
- What went wrong: A problem occurred evaluating script.
Cannot run program "node" (in directory "/Users/test/Documents/testA/react/app-test/test/android"): error=2, No such file or directory
- Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- Exception is: org.gradle.api.GradleScriptException: A problem occurred evaluating script. at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93) at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133) at org.gradle.configuration.DefaultScriptTarget.addConfiguration(DefaultScriptTarget.java:74) at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:136) at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:65) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71) at
1条答案
按热度按时间67up9zun1#
我找到了一个解决办法,
1.以管理员身份运行android studio
1.使用android studio打开项目
1.关闭android工作室
1.再次打开项目与android studio,但它是不必要的管理员