- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
按下按钮打开一个为电池创建图表的 Activity 后,我的应用程序中出现了一个 anr
。我从不使用traces.txt,所以我不知道在这个错误中我必须看什么:
----- pid 502 at 2013-12-10 14:29:15 -----
Cmd line: com.dd.batterystats
JNI: CheckJNI is off; workarounds are off; pins=0; globals=276
DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)
"main" prio=5 tid=1 SUSPENDED
| group="main" sCount=1 dsCount=0 obj=0x41571ca8 self=0x414ab408
| sysTid=502 nice=0 sched=0/0 cgrp=apps handle=1074172244
| state=S schedstat=( 57059843673 4570148676 34483 ) utm=5671 stm=34 core=1
at org.achartengine.chart.TimeChart.getXLabels(TimeChart.java:~190)
at org.achartengine.chart.XYChart.draw(XYChart.java:314)
at org.achartengine.GraphicalView.onDraw(GraphicalView.java:166)
at android.view.View.draw(View.java:14465)
at android.view.View.getDisplayList(View.java:13362)
at android.view.View.getDisplayList(View.java:13404)
at android.view.View.draw(View.java:14182)
at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
at android.view.View.getDisplayList(View.java:13357)
at android.view.View.getDisplayList(View.java:13404)
at android.view.View.draw(View.java:14182)
at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
at android.view.View.draw(View.java:14468)
at com.android.internal.widget.ActionBarOverlayLayout.draw(ActionBarOverlayLayout.java:381)
at android.view.View.getDisplayList(View.java:13362)
at android.view.View.getDisplayList(View.java:13404)
at android.view.View.draw(View.java:14182)
at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
at android.view.View.draw(View.java:14468)
at android.widget.FrameLayout.draw(FrameLayout.java:472)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2326)
at android.view.View.getDisplayList(View.java:13362)
at android.view.View.getDisplayList(View.java:13404)
at android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1570)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1449)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2381)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2253)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1883)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
at android.view.Choreographer.doCallbacks(Choreographer.java:574)
at android.view.Choreographer.doFrame(Choreographer.java:544)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
我必须看的线在哪里?这是哪个错误!?编辑:我已经更新了构建路径,现在我收到此错误:
12-10 15:30:22.036: E/InputEventReceiver(15922): Exception dispatching input event.
12-10 15:30:22.036: E/AndroidRuntime(15922): FATAL EXCEPTION: main
12-10 15:30:22.036: E/AndroidRuntime(15922): Process: com.dd.batterystats, PID: 15922
12-10 15:30:22.036: E/AndroidRuntime(15922): java.lang.NullPointerException
12-10 15:30:22.036: E/AndroidRuntime(15922): at org.achartengine.chart.XYChart.toRealPoint(XYChart.java:877)
12-10 15:30:22.036: E/AndroidRuntime(15922): at org.achartengine.tools.Pan.apply(Pan.java:74)
12-10 15:30:22.036: E/AndroidRuntime(15922): at org.achartengine.TouchHandler.handleTouch(TouchHandler.java:119)
12-10 15:30:22.036: E/AndroidRuntime(15922): at org.achartengine.GraphicalView.onTouchEvent(GraphicalView.java:300)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.View.dispatchTouchEvent(View.java:7706)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
12-10 15:30:22.036: E/AndroidRuntime(15922): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2068)
12-10 15:30:22.036: E/AndroidRuntime(15922): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1515)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.app.Activity.dispatchTouchEvent(Activity.java:2458)
12-10 15:30:22.036: E/AndroidRuntime(15922): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2016)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.View.dispatchPointerEvent(View.java:7886)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3954)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3833)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3399)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3449)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3418)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3525)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3426)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3582)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3399)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3449)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3418)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3426)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3399)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5602)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5582)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5553)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5682)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:176)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:5655)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:5701)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.Choreographer.doCallbacks(Choreographer.java:574)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.Choreographer.doFrame(Choreographer.java:542)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.os.Handler.handleCallback(Handler.java:733)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.os.Handler.dispatchMessage(Handler.java:95)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.os.Looper.loop(Looper.java:136)
12-10 15:30:22.036: E/AndroidRuntime(15922): at android.app.ActivityThread.main(ActivityThread.java:5017)
12-10 15:30:22.036: E/AndroidRuntime(15922): at java.lang.reflect.Method.invokeNative(Native Method)
12-10 15:30:22.036: E/AndroidRuntime(15922): at java.lang.reflect.Method.invoke(Method.java:515)
12-10 15:30:22.036: E/AndroidRuntime(15922): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
12-10 15:30:22.036: E/AndroidRuntime(15922): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
12-10 15:30:22.036: E/AndroidRuntime(15922): at dalvik.system.NativeStart.main(Native Method)
最佳答案
您需要学习阅读 Java 堆栈跟踪,这很简单而且非常有用。我有一个small blog post about this ,也许对你有用。
在第二种情况下,错误是 java.lang.NullPointerException
发生在 org.achartengine.chart.XYChart.toRealPoint(XYChart.java:877)
处。这意味着该文件和该行有一个空引用。
关于java - 使用 Traces.txt 了解 ANR 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20496533/
我在 X、Y 中有一个连续的点集合,我想将它们“追踪”到一组贝塞尔曲线中。是否可以为此使用任何开源位图到矢量跟踪算法或库? 最佳答案 这取决于你想要完成什么。如果您想查看“最佳拟合”曲线,或者至少是粗
这是我的程序: #include int sc_main(int argc, char* argv[]) { sc_signal a, b, c, d; // trace file
我想跟踪状态单子(monad)的变化。这不起作用: main :: IO () main = do print $ snd $ execState compute initialState t
Trace.Write 之间有什么区别? Writes information about the trace to the trace listeners 和Trace.TraceInformati
在 Chrome 中,您可以通过在运行时设置标志(使用 --js-flags="--stack-trace-limit " )或通过控制台(使用 Error.stackTraceLimit )来增加堆
我有一个第三方 Windows 服务,它控制/监视设备并更新 Oracle 数据库。他们的服务偶尔会报告关于数据库中的行/列“坏”的错误,但不会给出底层数据库错误,他们的服务需要重新启动,一切正常。当
我看到了这个关于 Tracing paint operations in Chrome Canary 的短视频 我已经尝试了所有选项,但无法使用这些出色的功能。 1.油漆(快照): 2.图层 View
在我的一个项目(.net core 3.1)中,我需要一种将 System.Diagnostics.Trace.WriteLine 重定向到 Serilog 文件的方法。我找到了 SerilogTra
我正在编写一个自动分析系统,以在我的应用程序中分析不同的 GPU 密集型屏幕。为此,我一直在尝试使用“XCode Instruments”,使用捕获 gpu 使用数据的“OpenGL ES Drive
我正在学习来自 JustForFunc episode 22 的教程 在 main.go 的 main() 开头添加这两行: trace.Start(os.Stdout) defer trace.St
我正在将 History.js 中的绑定(bind)编写到 PureScript 中,但仍在努力理解 Eff monad、一排效果是什么以及它们为何有值(value)。现在我用 EasyFFI 写了以
我不确定我是否理解 ETW 使用 System.Diagnostics.Tracing 和使用 System.Diagnostics.Trace 之间的主要区别。我知道使用它们我可以将事件转储到一些输
我需要像 native 一样的缩进和非缩进处理 trace class .有什么想法可以用 log4net 文件和控制台 appender 完成吗?谢谢 最佳答案 我建议将 log4net 控制台附加
当使用 Trace.Listener 时,任何人都可以告诉我为什么 Trace.Write(string message, string category) 方法时不将类别字符串传递给 TraceFi
我有一个从 Apache2 提供的 Django Web 应用程序,在 Docker 容器中使用 mod_wsgi,该容器运行在 Google Cloud Platform 的 Kubernetes
我的 LogCat 出现一些错误... E/Trace(627): error opening trace file: No such file or directory (2) 然后我找不到解决方案
我正在关注本教程:https://huggingface.co/transformers/torchscript.html 创建我的自定义 BERT 模型的痕迹,但是在运行完全相同的 dummy_in
我理解当请求包含 Ocp-Apim-Trace: true 时,如下所示: GET /api/v1/BotConfig HTTP/1.1 Host: xyz.azure-api.net Cache-C
我理解当请求包含 Ocp-Apim-Trace: true 时,如下所示: GET /api/v1/BotConfig HTTP/1.1 Host: xyz.azure-api.net Cache-C
My Microservices application has 3 different Microservices. many of them have been created with j
我是一名优秀的程序员,十分优秀!