2017-07-27 182 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

感谢您的支持,但是您提供的此解决方案没有奏效 –