REACT NATIVE
# guides
# components
# api
# architechture (opens new window)
# Rendering
# Glossary
Yoga
Flexible Layouts with Yoga (opens new window) Build flexible layouts on any platform with a highly optimized open source layout engine designed with speed, size, and ease of use in mind.
React Native 组件通常使用 Yoga 进行布局
# Troubleshooting
# node 命令不识别问题
使用 android studio 打开项目, 可能会出现 node 不识别的问题
解决方案:
- 打开
node_modules/@react-native-community/cli-platform-android/native_modules.gradle - 将
Runtime.getRuntime().exec方法的第二个参数替换为包含 node 的路径。 如下
String command = "node";
String path = "/path/to/directory"; // 替换为实际的路径
String[] envp = new String[] {"PATH=/usr/bin:/bin:/path/to/node_directory"}; // 替换为包含 node 的路径
Process process = Runtime.getRuntime().exec(command, envp, new File(path));
1
2
3
4
2
3
4
上次更新: 2025/10/16, 22:10:39