I have been learning how to use Systrace following instructions on how to use Systrace (from the Android Developers website). I've tried using both the GUI and the Terminal (command line).
I received an error after the trace had finished and was being saved. I clicked on the 'Details' button and overall, was given the following message:
Unable to collect system trace
Reason: Unexpected error while collecting system trace.
Conversion = ';'
The Systrace file was not saved.
I've tried using the command line as well using the GUI (although I'm new to using the command line).
Typing $ cd android-sdk/platform-tools/systrace
or $ python systrace.py
into the command line returns the error:
'$' is not recognized as an internal or external command, operable program or batch file.
Using cd android-sdk/platform-tools/systrace
(without the $
character) gives this error:
The system cannot find the path specified.
And using python systrace.py
(again, without the$
this time) returns this error:
'python' is not recognized as an internal or external command, operable program or batch file.
Am I missing something out, or is it something that needs to be reconfigured?
I finally fixed my issue following @fadden's guidance in the comments.
I used the command prompt to find out what my issues were, but my problem was also fixed for the GUI. Here's how I did it:
First, install Python if it's not already installed. I reinstalled it selecting the option: Add python.exe to Path (as in this image). I used Python 2 as I'm not sure how it would work with Python 3.
Next, edit environmental variables. You can do this (on Windows 8) by going to Control Panel -> System -> Advanced System Settings -> Environment Variables. Under 'System variables', scroll down to 'Path' and click the 'Edit' button.
Add Python to the Path by adding the address for the location of your Python installation followed by a semicolon to the start of the Variable value.
For example, I added C:\Python27\;
to the start of the 'Variable value'.
(Note: Do not delete/remove anything from the 'Variable value' textbox, just add to it).
Add adb.exe to Path as well by adding the address for the location of the file adb.exe similar to how you added Python to the path.
It should be something similar to C:\Users\MyName\Android-SDK\platform-tools;
.
Click 'OK' on the dialogs and restart your computer for the changes to take effect. You should now be able to use Systrace using the GUI and command line without this error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With