我正在 Mac 上使用 React-Native、Android 和 Genymotion。当我运行时,react-native run- android我在启动操作结束时得到以下行:
react-native run- android
... 04:54:40 E/adb: error: could not install *smartsocket* listener: Address already in use 04:54:40 E/adb: ADB server didn't ACK 04:54:40 E/ddms: '/Users/paulbrie/Library/Android/sdk/platform-tools/adb,start-server' failed -- run manually if necessary 04:54:40 E/adb: * failed to start daemon * 04:54:40 E/adb: error: cannot connect to daemon :app:installDebug FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:installDebug'. > com.android.builder.testing.api.DeviceException: Timeout getting device list. ...
但是,adb devices返回:
adb devices
List of devices attached 192.168.59.101:5555 device
到目前为止,我还没有找到在模拟器上运行我的应用程序的解决方案。有没有人遇到过同样的问题?
谢谢,保罗
经过更多研究,我意识到 Genymotion 默认使用自己的 adb。
我切换到我的主 adb(与 react-native 相同),它解决了这个问题。我猜是因为 Genymotion 的 adb 是先启动的,所以我收到了 Address already in use错误消息。
Address already in use