我正在尝试运行西斯特瑞斯,但是在运行命令时会出现错误。
user1@PC1:~/Android/Sdk/platform-tools/systrace$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
user1@PC1:~/Android/Sdk/platform-tools/systrace$ ls
AUTHORS prefix.html systrace.py
LICENSE suffix.html systrace_trace_viewer.html
NOTICE systrace-legacy.py UPSTREAM_REVISION
user1@PC1:~/Android/Sdk/platform-tools/systrace$ python systrace.py --time=10 -o mynewtrace.html
Traceback (most recent call last):
File "systrace.py", line 320, in <module>
main()
File "systrace.py", line 158, in main
stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory我目前使用AndroidSDK5.1.1和Android一起运行Ubuntu。下面是我在.bashrc中的路径导出:
export PATH="~/Applications/android-studio/bin/:$PATH"
export PATH="~/Android/Sdk/platform-tools/:$PATH"
export PATH="~/Android/Sdk/tools/:$PATH"发布于 2018-06-29 10:35:14
即使答案是被接受的,对于那些在未来面临这个问题的人来说;
从/platform-tools目录(亚行在/platform-tools目录中)运行systrace,而不是从/platform-tools/systrace目录运行systrace。例如。
.../platform-tools$ python systrace/systrace.pyhttps://stackoverflow.com/questions/30719387
复制相似问题