Traceview: trace file not found

by Graham Morehead » Mon, 03 Nov 2008 05:39:34 GMT


Sponsored Links
 In an attempt to debug my app, I was trying to use 'traceview' (one of
the apps in the the android SDK).  In the windows edition of the SDK
version 1.0, the executable is 'traceview.bat'.  I was able to get a
tracefile by using the 'android.os.Debug' package and using
Debug.startMethodTracing("basename"); and Debug.stopMethodTracing();
in my code.  I created a virtual sdcard for the emulator to use, and
then I ran the app on the emulator and was successful in creating a
trace file, which I pulled to a directory.  Here was my problem:
Whenever I tried to view the trace using 'traceview.bat', it said that
the file is not found.  This was hard to understand since I specified
the right directory.  I even went into that directory.  It still
couldn't find it.  I finally resolved it when I specified the whole
path using the notation  "C:/topdir/nextdir/... etc."  If you're not
familiar with Cygwin (a Unix shell for windows), you also have the
choice of specifying a path with "/cygdrive/c/topdir/...", but
'traceview' won't parse that.

Hope this helps someone.  It stalled me for hours.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Test onUpgrade

I changed my database schema on my application to include an
additional column in one of the tables.  I did this in the onUpgrade
method in the DBHelper.

Then I tried exporting my signed application and reinstalling it using
the 'adb install -r <app>.apk' command to try and 'simulate' an
application upgrade, but onUpgrade never gets called.

Is there a command that I can use to try and duplicate the behavior of
an application upgrade?

Thanks.
--~--~---------~--~----~------------~-------~--~----~

2. flag_fullscreen + windowNoTitle == button focus bug

Hi guys,

I've found an irritating bug that I could please use some help with.

My application is styled to show no title (android:windowNoTitle) and
in onCreate() in the activity the system toolbar is hidden to display
as fullscreen. There are two buttons in the activity's relative
layout, aligned top of parent and bottom. The bug happens when I use 5-
way navigation to focus the top button. The screen momentarily shifts
or bounces down the size of the default titlebar. In some instances
part of the bottom content gets clipped. Here is a mini app I created
to reproduce the bug. Any help to workaround this bug would be
appreciated! Note: you may have to run the app twice to see this
behavior.

Brady

[bug.java]

package com.adobe.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.WindowManager;

public class StatusBarBug extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
                getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);

        setContentView(R.layout.main);
    }
}


[main.xml]

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">

                <Button
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="button"/>

                <Button android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentBottom="true"
                        android:text="button2">
                        <requestFocus/>
                </Button>

</RelativeLayout>


[styles.xml]

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <!-- Themes -->
  <style name="StatusBarTheme">
        <item name="android:windowNoTitle">true</item>
  </style>
</resources>


[manifest.xml]

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.adobe.test"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name"
        android:theme="@style/StatusBarTheme">
        <activity android:name=".StatusBarBug"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="3" />
</manifest>
--~--~---------~--~----~------------~-------~--~----~

3. Market App on Android Platform

4. running android applications without using eclipse

5. minor http://source.android.com/download correction

6. how can I port market app(may be vending.apk) on my product

7. About messages_en_US