node.js is not installed android studio gradle

Viewed 3236

guys,

I found the answer node-js-is-not-installed and I have the same problem

actually, I have nodejs

sudo apt-get install nodejs
Reading state information... Done
nodejs is already the newest version (8.10.0~dfsg-2ubuntu0.4)

. but if I try to build I coach Gradle exception like

Node.js is not installed. Visit https://nodejs.org/en/download/ to install it.
Open File

unfortunately, steps by issues/3745 don't resolve it fo me

enter image description here

any help would be appreciated.

4 Answers

I had a identical problem earlier today. But I'm on a Mac. Same behaviour as you experienced.

I've try to reinstall node, and several rebuilding of my project but none of those worked.

In the end, I started over. Seems that the installation of the amplify cli did not went throught the previous time.

npm install -g @aws-amplify/cli

But I've come to another problem with the manifest.xml right after that. I think both are related...

And adding this to my manifest did the job : 'tools:replace="android:name"' (for reference if this problem follow : https://github.com/aws-amplify/amplify-android/issues/532 )

Run this in your project directory and then resync: npx amplify-app --platform android

At least, this helped me

Did you install amplify using sudo? That has solved my problem. Also using Mac OSX

Looks like you may not have proper write permissions on node_modules folder, use chmod 777 your_node_module_folder

Related