我正在尝试在android模拟器上运行离子应用程序,但是我一直收到此错误。
ANDROID_HOME=C:\Users\Dell\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_171
(node:14376) UnhandledPromiseRejectionWarning: Error: C:\Users\Dell\AppData\Local\Android\sdk\platform-tools\adb.exe: Command failed with exit code 1 Error output:
adb server version (39) doesn't match this client (40); killing...
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon
at ChildProcess.whenDone (C:\Users\Dell\Desktop\ionicsidemenu\ionic2-sidemenu-highlight\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at ChildProcess.emit (events.js:180:13)
at maybeClose (internal/child_process.js:936:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
(node:14376) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14376) [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.
答案 0 :(得分:0)
对于这种不一致的情况,可能的解决方案如下:
<preference name="loadUrlTimeoutValue" value="700000" />
adb kill-server adb forward --remove-all adb start-server