我无法运行任何 react-native 项目,它说已经有一个进程在运行。端口8081被正在运行的Mac上的 McAfee 杀毒软件占用。无论我如何努力(即使不应该杀死它),都无法杀死该进程! SUDO 没有任何作用!
参考 #7308、#9145 和 stackoverflow,我尝试在8082端口上运行。服务器启动了,但是run-android仍然失败,显示未找到设备。我的设备(打开调试模式的 Galaxy S7 Edge)和 Genymotion 都已打开。
React Native 版本详细信息 -
SATJAGAN-M-T0HZ:react-native-card-modal satjagan$ react-native -v
react-native-cli: 1.0.0
react-native: 0.37.0
Genymotion已激活并可用 -
bozzmob:Twitter bozzmobusr$ adb devices
List of devices attached
192.168.57.101:5555 device
运行应用程序的终端日志- (有趣的是,它说 JS服务器未被识别,那里是否有问题)?
bozzmob:Twitter bozzmobusr$ react-native start --port 8082
Scanning 712 folders for symlinks in /Users/satjagan/collection/work/github/reactnative/react-native-card-modal/node_modules (15ms)
┌────────────────────────────────────────────────────────────────────────────┐
│ Running packager on port 8082. │
│ │
│ Keep this packager running while developing on any JS projects. Feel │
│ free to close this tab and run your own packager instance if you │
│ prefer. │
│ │
│ https://github.com/facebook/react-native │
│ │
└────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
/Users/satjagan/collection/work/github/reactnative/react-native-card-modal
[Hot Module Replacement] Server listening on /hot
React packager ready.
[11/26/2016, 2:47:25 PM] <START> Initializing Packager
[11/26/2016, 2:47:25 PM] <START> Building in-memory fs for JavaScript
[11/26/2016, 2:47:25 PM] <END> Building in-memory fs for JavaScript (184ms)
[11/26/2016, 2:47:25 PM] <START> Building Haste Map
[11/26/2016, 2:47:25 PM] <END> Building Haste Map (425ms)
[11/26/2016, 2:47:25 PM] <END> Initializing Packager (741ms)
bozzmob:Twitter bozzmobusr$ react-native run-android
**JS server not recognized, continuing with build...**
Running adb -s 192.168.57.101:5555 reverse tcp:8081 tcp:8081
Building and installing the app on the device (cd android && ./gradlew installDebug...
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment.
Go to https://facebook.github.io/react-native/docs/getting-started.html
and check the Android tab for setup instructions.
很不幸,无法卸载 McAfee :( 如果我有自由的话,我会首先这样做。