Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Systrace: Unexpected error (Conversion = ';')

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).

Using the GUI:

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.

Using the command line:

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?

like image 212
Farbod Salamat-Zadeh Avatar asked Jun 06 '15 01:06

Farbod Salamat-Zadeh


1 Answers

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:

  1. 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.

  2. 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.

  3. 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).

  4. 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;.

  5. 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.

like image 69
Farbod Salamat-Zadeh Avatar answered Nov 01 '22 13:11

Farbod Salamat-Zadeh