Ionic run android in livereload failed on mac os


#1

ionic run android in live reload failed, i’m trying to emulate in android
i tried
ionic cordova run android --livereload
ionic cordova run -l -c -s --debug --device
ionic cordova run android -lc

the error I’m getting

node:1878) UnhandledPromiseRejectionWarning: Error: adb: Command failed with exit code 1 Error output:
adb server version (39) doesn't match this client (40); killing...
ADB server didn't ACK
Full server startup log: /var/folders/xc/6mz7_qsn55vg68xq2n7_r_rc0000gn/T//adb.501.log
Server had pid: 1919
--- adb starting (pid 1919) ---
adb I 07-09 11:37:49  1919 66539 main.cpp:56] Android Debug Bridge version 1.0.40
adb I 07-09 11:37:49  1919 66539 main.cpp:56] Version 4797878
adb I 07-09 11:37:49  1919 66539 main.cpp:56] Installed as /Users/anspireagency/Library/Android/sdk//platform-tools/adb
adb I 07-09 11:37:49  1919 66539 main.cpp:56]
adb I 07-09 11:37:49  1919 66539 auth.cpp:421] adb_auth_init...
adb I 07-09 11:37:49  1919 66539 auth.cpp:174] read_key_file '/Users/anspireagency/.android/adbkey'...
adb server killed by remote request

* failed to start daemon
error: cannot connect to daemon
    at ChildProcess.whenDone (/Users/anspireagency/Desktop/development/Archive 2/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:1878) 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:1878) [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.

ionic info

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 7.0.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    ios-deploy        : 1.9.2
    ios-sim           : 6.1.2
    Node              : v8.11.1
    npm               : 5.6.0
    OS                : macOS High Sierra
    Xcode             : Xcode 9.2 Build version 9C40b

Environment Variables:

    ANDROID_HOME : /Users/anspireagency/Library/Android/sdk/

Misc:

    backend : pro