I am having a problem getting Android Studio to build a project on the M1 Mac mini. It gives back the following error:
Execution failed for task ':app:nodeSetup'.
> Could not resolve all files for configuration ':app:detachedConfiguration3'.
> Could not find org.nodejs:node:6.7.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/nodejs/node/6.7.0/node-6.7.0.pom
- https://jcenter.bintray.com/org/nodejs/node/6.7.0/node-6.7.0.pom
- https://repo.maven.apache.org/maven2/org/nodejs/node/6.7.0/node-6.7.0.pom
- https://jitpack.io/org/nodejs/node/6.7.0/node-6.7.0.pom
- https://plugins.gradle.org/m2/org/nodejs/node/6.7.0/node-6.7.0.pom
- https://nodejs.org/dist/v6.7.0/node-v6.7.0-darwin-arm64.tar.gz
Required by:
project :app
Node is installed and the Path is set. For me it looks like a dependency error, but I can not find where it is. Also online I could find any solutions to this.
If someone is around, that could help, that’d be awesome, I speeded now hours trying to fix this 🙂
2
Answers
As Joe said node 6.7.0 is too old.
Try to add node version as below.
Follow these steps:
Add the following node version to build.gradle (including submodule)
android {
node {
version = "16.2.0"
}
}
Invalidate Cache and restart
Clean build.
These steps worked for me on Android Studio Arctic Fox Patch 4.
Also, downgrading studio to version 4.1.1 solved this issue for me without adding the node version.