Android - Eclipse: Trace Files
I have two problems - but first first:
Dell Inspiron M5030: AMD Athlon II P360
Windows 7 Ultimate 32bit SP 1
Android ADT 21.0.1-543035
org.eclipse.platform.ide 3.8.0-I20120608-1200
EMULATOR:
4.0 "WVGA (480x800: hdpi)
Android 4.2 (API 17)
armeabi-v7a
RAM: 512, VM heap: 16
Internal storage:
600MB SDCard 128MB, use main GPU
In the onCreate of my activity, I have the following lines:
super.onCreate(savedInstanceState);
if (BuildConfig.DEBUG) {
Log.i(Constants.TAG_ACTSPLASH, "onCreate() Method called.");
Debug.startMethodTracing("actsplash");
}
In onDestroy of my activity, I have the following lines:
super.onDestroy();
if (BuildConfig.DEBUG) {
Log.i(Constants.TAG_ACTSPLASH, "onDestroy()");
Debug.stopMethodTracing();
}
PROBLEM NUMBER ONE: In debug mode, after calling onCreate, Logcat says:
davlikvm: Unable to open trace file '/mnt/sdcard/actsplash.trace': Permission denied
NOTE. When I run the apk on my Epic4G (Android 4.2), a trace file is generated.
ISSUE NUMBER TWO: Trace file extracted from Epic4G could not be processed. (1) When running traceview, I get the error:
The standalone version of traceview is deprecated. Please use Android Device Monitor (tools/monitor) instead. trace file './actsplash.trace' not found
(2) When launching ADM (% SDK% / tools / monitor.bat) and loading the trace file, I get:
Failed to read the stack trace.
This article talks about a key file ... is that what's missing? Any help would be appreciated!
source to share
The first problem can be fixed by adding the WRITE_EXTERNAL_STORAGE permission to your application so that it can write to / sdcard. Also, explicitly specify the name of the trace file in the storage area of the private application and pull the file out of it.
The second problem is "the trace file was not found", which is a direct result of the first. The third problem appears to be a variation on the second.
The trace file itself was split into "key" and "data", but they were merged into one .trace file a long time ago.
source to share