It’s because android studio couldn’t find node and should run through terminal.
If you are using Mac you can run Android studio using This command in terminal
1. Run this open -a /Applications/Android\ Studio.app
If you installed Android Studio through Jetbrains Toolbox, run
open -a ~/Applications/JetBrains\ Toolbox/Android\ Studio.app
2. Then sync Gradle
And this will solve the problem.