我试图访问我的React Native应用程序的日志。
为此,我正在运行:
react-native log-android
但是,我遇到了这个问题:
error: more than one device/emulator
adb invocation failed. Do you have adb in your PATH?
(node:24464) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): undefined
(node:24464) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
adb
肯定在我的道路上,所以不是问题。
我只打开了一个Android模拟器。
知道还有什么可能导致这种情况吗?
答案 0 :(得分:2)
尝试运行adb devices
。有不止一个?如果是这样,请关闭已连接的额外设备。有时您连接的手机将被视为设备。您还希望拥有export PATH=$PATH:{YOURANDROIDTOOLS}
(例如/ Users / {USER} / Library / Android / sdk / tools
或/Users/{USER}/Applications/Genymotion.app如果你在zshrc或个人资料中使用genymotion