我有两个问题——但是先说重点:
戴尔Inspiron M5030:AMD Athlon II P360
Windows 7 Ultimate 32位SP 1
Android ADT 21.0.1-543035
org.eclipse.platform.ide 3.8.0-I20120608-1200
模拟器:
4.0“ WVGA(480x800:hdpi)
Android 4.2(API 17)
armeabi-v7a
RAM:512,VM Heap:16
内部存储:600MB
SD卡大小128MB,使用主机GPU
在我的活动的onCreate中,我有以下这些行:
super.onCreate(savedInstanceState);
if (BuildConfig.DEBUG) {
Log.i(Constants.TAG_ACTSPLASH, "onCreate() Method called.");
Debug.startMethodTracing("actsplash");
}
在我的活动的onDestroy方法中,我有以下几行代码:
super.onDestroy();
if (BuildConfig.DEBUG) {
Log.i(Constants.TAG_ACTSPLASH, "onDestroy()");
Debug.stopMethodTracing();
}
问题一:在调试模式下,调用onCreate后,Logcat会显示以下信息:
davlikvm: Unable to open trace file '/mnt/sdcard/actsplash.trace': Permission denied
注意:在我的Epic4G(Android 4.2)上运行apk时,会创建跟踪文件。
问题二:从Epic4G提取的跟踪文件无法处理。 (1)运行traceview时出现错误:
The standalone version of traceview is deprecated. Please use Android Device Monitor (tools/monitor) instead. trace file './actsplash.trace' not found
(2)当运行ADM('%SDK%/tools/monitor.bat')并加载跟踪文件时,我会收到以下提示:
Failed to read the stack trace.
这篇文章提到了密钥文件...这是缺失的东西吗?我们将很感激您的任何帮助!
Context.getFilesDir()
而不是硬编码路径,但你的想法是正确的。如果你用文本编辑器查看跟踪文件,你应该会看到它以*version
开头,然后是一些配置信息,接着是一个方法列表,紧随其后的是二进制数据。有时当事情失败时,你会得到一个零长度的文件,并且并不是所有的东西都能很好地告诉你,所以请检查文件内容。 - fadden