0

我想将我的设备连接到 firebase 控制台以使用 firebase 调试视图,我使用此命令连接到调试视图

adb shell setprop debug.firebase.analytics.app com.myapp.com

但它显示错误

adb server version (41) doesn't match this client (40); killing...
ADB server didn't ACK
Full server startup log: /var/folders/dw/9xs5z5k129s5y7skjb5r5dpsqj7q4q/T//adb.1863572631.log
Server had pid: 5750
--- adb starting (pid 5750) ---
adb I 03-11 13:52:01  5750 562896 main.cpp:56] Android Debug Bridge version 1.0.40
adb I 03-11 13:52:01  5750 562896 main.cpp:56] Version 4986621
adb I 03-11 13:52:01  5750 562896 main.cpp:56] Installed as /usr/local/bin/adb
adb I 03-11 13:52:01  5750 562896 main.cpp:56] 
adb I 03-11 13:52:01  3065 238368 transport.cpp:980] kicking transport 0x7fa99af00200 NZT8ZLSWF6MRE6RC
adb I 03-11 13:52:01  3065 238368 transport.cpp:358] BlockingConnectionAdapter(NZT8ZLSWF6MRE6RC): stopping
adb I 03-11 13:52:01  3065 238368 usb_osx.cpp:566] Kicking handle
adb E 03-11 13:52:01  3065 238388 usb_osx.cpp:541] usb_read failed with status: e00002eb
adb I 03-11 13:52:01  3065 238388 transport.cpp:286] NZT8ZLSWF6MRE6RC: read failed: Undefined error: 0
adb I 03-11 13:52:01  3065 238388 transport.cpp:695] NZT8ZLSWF6MRE6RC: connection terminated: read failed
adb I 03-11 13:52:01  3065 238368 transport.cpp:376] BlockingConnectionAdapter(NZT8ZLSWF6MRE6RC): stopped
adb I 03-11 13:52:01  5750 562899 usb_osx.cpp:308] reported max packet size for NZT8ZLSWF6MRE6RC is 512
adb I 03-11 13:52:01  5750 562896 auth.cpp:421] adb_auth_init...
adb I 03-11 13:52:01  5750 562896 auth.cpp:174] read_key_file '/Users/my.user/.android/adbkey'...
adb I 03-11 13:52:01  5750 562906 transport.cpp:281] NZT8ZLSWF6MRE6RC: read thread spawning
adb I 03-11 13:52:01  5750 562907 transport.cpp:294] NZT8ZLSWF6MRE6RC: write thread spawning
adb server killed by remote request
adb I 03-11 13:52:01  5750 562896 transport.cpp:337] BlockingConnectionAdapter(NZT8ZLSWF6MRE6RC): stopping
adb I 03-11 13:52:01  5750 562896 usb_osx.cpp:561] Kicking handle
adb E 03-11 13:52:01  5750 562906 usb_osx.cpp:541] usb_read failed with status: e00002eb
adb I 03-11 13:52:01  5750 562906 transport.cpp:285] NZT8ZLSWF6MRE6RC: read failed: Undefined error: 0
adb I 03-11 13:52:01  5750 562896 transport.cpp:355] BlockingConnectionAdapter(NZT8ZLSWF6MRE6RC): stopped
--- adb starting (pid 5756) ---
adb I 03-11 13:52:01  5756 562921 main.cpp:60] Android Debug Bridge version 1.0.41
adb I 03-11 13:52:01  5756 562921 main.cpp:60] Version 29.0.5-5949299
adb I 03-11 13:52:01  5756 562921 main.cpp:60] Installed as /Users/my.user/Library/Android/sdk/platform-tools/adb
adb I 03-11 13:52:01  5756 562921 main.cpp:60] 

* failed to start daemon
error: cannot connect to daemon

如果有人遇到此问题,请提供帮助

4

1 回答 1

0

问题是您的系统有两个 adb 文件。一个位于 Android 文件夹的平台工具中,另一个位于系统级别。例如,在 ubuntu 中,它位于 bin/ 文件夹中。只需删除系统级别的 adb 并将其替换为 Android 平台工具中的 adb 即可。就这么简单。

于 2021-03-02T06:14:25.117 回答