2017-07-27 181 views
-1

我想知道我的Android應用程序的錯誤檢查應用程序的日誌得到錯誤,所以我試圖用的logcat看到它的日誌,並按照這些步驟: -同時使用logcat的在Linux中

You need to use adb server. 
1. Connect your android with your laptop/pc 
2. Go to developer options and turn on the stay awake and USB debugging options. (Your phone) 
3. In your terminal, type "sudo adb kill-server" and then "sudo adb start-server". 
4. Type "adb devices" (this should give list of devices connected) 
    List of devices attached 
    you_device_name device 

5. "cd" to your folder where you have made your build. 
6. Type "buildozer android debug deploy run logcat > logcat.txt" 
this saves the logs (for the entire process) in a file logcat.txtx in the same folder and also deploys you app on the phone. 
Go through it and find your error. 
7. keep your phone awake.(do not lock it). 

但是,當我跑的第6步,每次談到它說: -

error: device 'adb' not found 
- waiting for device - 

我已經在互聯網上搜索了很多次,當最後我張貼在這裏得到解決

+0

不要Downvote如果有人不知道該解決方案 –

+0

什麼,當你運行'亞行devices'發生什麼呢?您的設備是否使用正確的權限檢測?你可以請發佈輸出嗎? –

+0

@SrinivasSuresh這是結果: - 根@卡莉:〜#ADB設備 連接 *守護程序沒有運行的設備的清單。現在從端口5037開始* *守護進程已成功啓動* efeb26190903 \t設備 –

回答

0

我張貼這是一個答案,因爲我不wa nt在評論中有一個擴展的討論[所以請不要downvote,或upvote,除非這項工作]

我實際上最初誤讀推土機錯誤。它抱怨設備adb不存在。這很奇怪。它應該拿起設備序列來代替。

理論上你就可以強制命令,亞行通過執行
export ANDROID_SERIAL= <your device's serial number>

去你的設備現在可以重複步驟和檢查,如果這個工程。

也只是爲了完整性,只需檢查您的設備的系統partitin中是否存在adb二進制文件。

另外,還要確保你沒有錯過任何推土機初始化步驟

+0

感謝您的支持,但是您提供的此解決方案沒有奏效 –