在 Ubuntu 18.04.6 上
在鏈接上設(shè)備以后,發(fā)現(xiàn)可以用 Android Studio 安裝應(yīng)用
但無法用 Android Studio 看 logcat
手動從命令行停止,啟動 adb 會報錯如下:
daemon not running.
starting it now on port 5037
ADB server didn't ACK
failed to start daemon
error: cannot connect to daemon
Android Studio 下面 logcat 標(biāo)簽頁,設(shè)備選擇框顯示 "no connected devices",但卻可以正常安裝 app,就是沒 log。
我這里的錯誤原因是因為之前用 sudo apt-get install adb 安裝過 adb
adb 版本太低導(dǎo)致的。
建議通過 update-alternatives 使用 android studio 里面 Tools -> sdk manager -> SDK Tools -> Android SDK Platform-Tools 的最新版文章來源:http://www.zghlxwxcb.cn/news/detail-649360.html
然后操作一下 update-alternatives,使用新版的,再重啟 Android Studio 即可。文章來源地址http://www.zghlxwxcb.cn/news/detail-649360.html
sudo update-alternatives --install /usr/bin/adb adb /usr/lib/android-sdk/platform-tools/adb 1000
sudo update-alternatives --install /usr/bin/adb adb /home/xxx/Android/Sdk/platform-tools/adb 2000
sudo update-alternatives --config adb
# 然后選擇優(yōu)先級為 2000 的版本
到了這里,關(guān)于Ubuntu 18.04.6 Android Studio Giraffe adb logcat 無法使用的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!