我正在 Mac 上使用 React-Native、Android 和 Genymotion。当我跑步时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
返回这个:
List of devices attached
192.168.59.101:5555 device
到目前为止,我还没有找到在模拟器上运行我的应用程序的解决方案。有人遇到过同样的问题吗?
谢谢,
保罗
经过更多研究,我意识到 Genymotion 默认使用它自己的 adb。
![enter image description here](https://i.stack.imgur.com/N0fjx.png)
我切换到我的主adb(与react-native使用的相同),它解决了问题。我猜是因为 Genymotion 的 adb 首先启动,所以我得到了Address already in use
错误信息。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)