0

Google最近更新了Google Play控制台,现在会自动报告崩溃。新的Google开发者控制台崩溃堆栈跟踪不准确

由于几乎所有的堆栈跟踪我是不准确了:

  • 堆栈跟踪充满<OR>方法,所以我想尽可能全面的候选人?
  • 所有的行号0

请注意,我用Proguard的(而不是Multidex),我强烈怀疑这是问题的原因。

实施例:

java.lang.ClassCastException: 
at <<MyPackage>>.adapters.PackageRecyclerViewAdapter.getItemCount(PackageRecyclerViewAdapter.java:0) 
at <OR>.getItemViewType(PackageRecyclerViewAdapter.java:0) 
at <OR>.onBindViewHolder(PackageRecyclerViewAdapter.java:0) 
at <OR>.onCreateViewHolder(PackageRecyclerViewAdapter.java:0) 
at android.support.v7.widget.RecyclerView$Adapter.onCreateViewHolder(RecyclerView.java:0) 
at <OR>.onBindViewHolder(RecyclerView.java:0) 
at <OR>.onBindViewHolder(RecyclerView.java:0) 
at <OR>.getItemViewType(RecyclerView.java:0) 
at <OR>.getItemCount(RecyclerView.java:0) 
at <OR>.onViewRecycled(RecyclerView.java:0) 
at <OR>.registerAdapterDataObserver(RecyclerView.java:0) 
at <OR>.onAttachedToRecyclerView(RecyclerView.java:0) 
at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:0) 
at <OR>.bindViewHolder(RecyclerView.java:0) 
at <OR>.getItemId(RecyclerView.java:0) 
at <OR>.hasStableIds(RecyclerView.java:0) 
at <OR>.onFailedToRecycleView(RecyclerView.java:0) 
at <OR>.unregisterAdapterDataObserver(RecyclerView.java:0) 
at <OR>.onDetachedFromRecyclerView(RecyclerView.java:0) 
at android.support.v7.widget.RecyclerView$Recycler.clear(RecyclerView.java:0) 
at <OR>.setViewCacheSize(RecyclerView.java:0) 
at <OR>.validateViewHolderForOffsetPosition(RecyclerView.java:0) 
at <OR>.tryBindViewHolderByDeadline(RecyclerView.java:0) 
at <OR>.getViewForPosition(RecyclerView.java:0) 
at <OR>.tryGetViewHolderForPositionByDeadline(RecyclerView.java:0) 
at <OR>.invalidateDisplayListInt(RecyclerView.java:0) 
at <OR>.recycleView(RecyclerView.java:0) 
at <OR>.addViewHolderToRecycledViewPool(RecyclerView.java:0) 
at <OR>.getScrapOrCachedViewForId(RecyclerView.java:0) 
at <OR>.onAdapterChanged(RecyclerView.java:0) 
at <OR>.offsetPositionRecordsForMove(RecyclerView.java:0) 
at <OR>.offsetPositionRecordsForRemove(RecyclerView.java:0) 
at <OR>.setViewCacheExtension(RecyclerView.java:0) 
at <OR>.setRecycledViewPool(RecyclerView.java:0) 
at android.support.v7.widget.RecyclerView$Recycler.clear(RecyclerView.java:0) 
at <OR>.setViewCacheSize(RecyclerView.java:0) 
at <OR>.validateViewHolderForOffsetPosition(RecyclerView.java:0) 
at <OR>.tryBindViewHolderByDeadline(RecyclerView.java:0) 
at <OR>.getViewForPosition(RecyclerView.java:0) 
at <OR>.tryGetViewHolderForPositionByDeadline(RecyclerView.java:0) 
at <OR>.invalidateDisplayListInt(RecyclerView.java:0) 
at <OR>.recycleView(RecyclerView.java:0) 
at <OR>.addViewHolderToRecycledViewPool(RecyclerView.java:0) 
at <OR>.getScrapOrCachedViewForId(RecyclerView.java:0) 
at <OR>.onAdapterChanged(RecyclerView.java:0) 
at <OR>.offsetPositionRecordsForMove(RecyclerView.java:0) 
at <OR>.offsetPositionRecordsForRemove(RecyclerView.java:0) 
at <OR>.setViewCacheExtension(RecyclerView.java:0) 
at <OR>.setRecycledViewPool(RecyclerView.java:0) 
at android.support.v7.widget.RecyclerView$Recycler.clear(RecyclerView.java:0) 
at <OR>.setViewCacheSize(RecyclerView.java:0) 
at <OR>.validateViewHolderForOffsetPosition(RecyclerView.java:0) 
at <OR>.tryBindViewHolderByDeadline(RecyclerView.java:0) 
at <OR>.getViewForPosition(RecyclerView.java:0) 
at <OR>.tryGetViewHolderForPositionByDeadline(RecyclerView.java:0) 
at <OR>.invalidateDisplayListInt(RecyclerView.java:0) 
at <OR>.recycleView(RecyclerView.java:0) 
at <OR>.addViewHolderToRecycledViewPool(RecyclerView.java:0) 
at <OR>.getScrapOrCachedViewForId(RecyclerView.java:0) 
at <OR>.onAdapterChanged(RecyclerView.java:0) 
at <OR>.offsetPositionRecordsForMove(RecyclerView.java:0) 
at <OR>.offsetPositionRecordsForRemove(RecyclerView.java:0) 
at <OR>.setViewCacheExtension(RecyclerView.java:0) 
at <OR>.setRecycledViewPool(RecyclerView.java:0) 
at android.support.v7.widget.RecyclerView$Recycler.getScrapList(RecyclerView.java:0) 
at <OR>.getViewForPosition(RecyclerView.java:0) 
at <OR>.scrapView(RecyclerView.java:0) 
at <OR>.unscrapView(RecyclerView.java:0) 
at <OR>.viewRangeUpdate(RecyclerView.java:0) 
at android.support.v7.widget.LinearLayoutManager$LayoutState.hasMore(LinearLayoutManager.java:0) 
at <OR>.next(LinearLayoutManager.java:0) 
at <OR>.assignPositionFromScrapList(LinearLayoutManager.java:0) 
at <OR>.assignPositionFromScrapList(LinearLayoutManager.java:0) 
at android.support.v7.widget.LinearLayoutManager.generateDefaultLayoutParams(LinearLayoutManager.java:0) 
at <OR>.onDetachedFromWindow(LinearLayoutManager.java:0) 
at <OR>.onInitializeAccessibilityEvent(LinearLayoutManager.java:0) 
at <OR>.onRestoreInstanceState(LinearLayoutManager.java:0) 
at <OR>.setStackFromEnd(LinearLayoutManager.java:0) 
at <OR>.smoothScrollToPosition(LinearLayoutManager.java:0) 
at <OR>.onLayoutCompleted(LinearLayoutManager.java:0) 
at <OR>.onAnchorReady(LinearLayoutManager.java:0) 
at <OR>.updateAnchorInfoForLayout(LinearLayoutManager.java:0) 
at <OR>.updateAnchorFromPendingData(LinearLayoutManager.java:0) 
at <OR>.fixLayoutEndGap(LinearLayoutManager.java:0) 
at <OR>.updateLayoutStateToFillEnd(LinearLayoutManager.java:0) 
at <OR>.updateLayoutStateToFillEnd(LinearLayoutManager.java:0) 
at <OR>.scrollHorizontallyBy(LinearLayoutManager.java:0) 
at <OR>.updateLayoutState(LinearLayoutManager.java:0) 
at <OR>.collectPrefetchPositionsForLayoutState(LinearLayoutManager.java:0) 
at <OR>.collectInitialPrefetchPositions(LinearLayoutManager.java:0) 
at <OR>.collectAdjacentPrefetchPositions(LinearLayoutManager.java:0) 
at <OR>.assertNotInLayoutOrScroll(LinearLayoutManager.java:0) 
at <OR>.recycleChildren(LinearLayoutManager.java:0) 
at <OR>.recycleViewsFromStart(LinearLayoutManager.java:0) 
at <OR>.recycleByLayoutState(LinearLayoutManager.java:0) 
at <OR>.fill(LinearLayoutManager.java:0) 
at <OR>.layoutChunk(LinearLayoutManager.java:0) 
at <OR>.findFirstVisibleChildClosestToStart(LinearLayoutManager.java:0) 
at <OR>.findReferenceChild(LinearLayoutManager.java:0) 
at <OR>.findOneVisibleChild(LinearLayoutManager.java:0) 
at <OR>.onFocusSearchFailed(LinearLayoutManager.java:0) 
at android.support.v7.widget.LinearLayoutManager.generateDefaultLayoutParams(LinearLayoutManager.java:0) 
at <OR>.onDetachedFromWindow(LinearLayoutManager.java:0) 
at <OR>.onInitializeAccessibilityEvent(LinearLayoutManager.java:0) 
at <OR>.onRestoreInstanceState(LinearLayoutManager.java:0) 
at <OR>.setStackFromEnd(LinearLayoutManager.java:0) 
at <OR>.smoothScrollToPosition(LinearLayoutManager.java:0) 
at <OR>.onLayoutCompleted(LinearLayoutManager.java:0) 
at <OR>.onAnchorReady(LinearLayoutManager.java:0) 
at <OR>.updateAnchorInfoForLayout(LinearLayoutManager.java:0) 
at <OR>.updateAnchorFromPendingData(LinearLayoutManager.java:0) 
at <OR>.fixLayoutEndGap(LinearLayoutManager.java:0) 
at <OR>.updateLayoutStateToFillEnd(LinearLayoutManager.java:0) 
at <OR>.updateLayoutStateToFillEnd(LinearLayoutManager.java:0) 
at <OR>.scrollHorizontallyBy(LinearLayoutManager.java:0) 
at <OR>.updateLayoutState(LinearLayoutManager.java:0) 
at <OR>.collectPrefetchPositionsForLayoutState(LinearLayoutManager.java:0) 
at <OR>.collectInitialPrefetchPositions(LinearLayoutManager.java:0) 
at <OR>.collectAdjacentPrefetchPositions(LinearLayoutManager.java:0) 
at <OR>.assertNotInLayoutOrScroll(LinearLayoutManager.java:0) 
at <OR>.recycleChildren(LinearLayoutManager.java:0) 
at <OR>.recycleViewsFromStart(LinearLayoutManager.java:0) 
at <OR>.recycleByLayoutState(LinearLayoutManager.java:0) 
at <OR>.fill(LinearLayoutManager.java:0) 
at <OR>.layoutChunk(LinearLayoutManager.java:0) 
at <OR>.findFirstVisibleChildClosestToStart(LinearLayoutManager.java:0) 
at <OR>.findReferenceChild(LinearLayoutManager.java:0) 
at <OR>.findOneVisibleChild(LinearLayoutManager.java:0) 
at <OR>.onFocusSearchFailed(LinearLayoutManager.java:0) 
at android.support.v7.widget.LinearLayoutManager.onSaveInstanceState(LinearLayoutManager.java:0) 
at <OR>.findViewByPosition(LinearLayoutManager.java:0) 
at <OR>.onLayoutChildren(LinearLayoutManager.java:0) 
at <OR>.computeHorizontalScrollOffset(LinearLayoutManager.java:0) 
at <OR>.scrollBy(LinearLayoutManager.java:0) 
at <OR>.findOnePartiallyOrCompletelyInvisibleChild(LinearLayoutManager.java:0) 
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:0) 
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:0) 
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:0) 
at android.view.View.layout(View.java:17945) 
at android.view.ViewGroup.layout(ViewGroup.java:5812) 
at android.support.v4.view.ViewPager.onLayout(ViewPager.java:0) 
at android.view.View.layout(View.java:17945) 
at android.view.ViewGroup.layout(ViewGroup.java:5812) 
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1080) 
at android.view.View.layout(View.java:17945) 
at android.view.ViewGroup.layout(ViewGroup.java:5812) 
at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:0) 
at android.view.View.layout(View.java:17945) 
at android.view.ViewGroup.layout(ViewGroup.java:5812) 
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1742) 
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) 
at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) 
at android.view.View.layout(View.java:17945) 
at android.view.ViewGroup.layout(ViewGroup.java:5812) 
at android.support.design.widget.CoordinatorLayout.getLastChildRect(CoordinatorLayout.java:0) 
at <OR>.layoutChild(CoordinatorLayout.java:0) 
at <OR>.resolveGravity(CoordinatorLayout.java:0) 
at <OR>.getDependencies(CoordinatorLayout.java:0) 
at <OR>.removePreDrawListener(CoordinatorLayout.java:0) 
at android.support.design.widget.CoordinatorLayout.releaseTempRect(CoordinatorLayout.java:0) 
at <OR>.setWindowInsets(CoordinatorLayout.java:0) 
at <OR>.getTopSortedChildren(CoordinatorLayout.java:0) 
at <OR>.performIntercept(CoordinatorLayout.java:0) 
at <OR>.parseBehavior(CoordinatorLayout.java:0) 
at <OR>.getResolvedLayoutParams(CoordinatorLayout.java:0) 
at <OR>.getDescendantRect(CoordinatorLayout.java:0) 
at <OR>.onMeasureChild(CoordinatorLayout.java:0) 
at <OR>.onLayoutChild(CoordinatorLayout.java:0) 
at <OR>.getChildRect(CoordinatorLayout.java:0) 
at <OR>.getDesiredAnchoredChildRectWithoutConstraints(CoordinatorLayout.java:0) 
at <OR>.constrainChildRect(CoordinatorLayout.java:0) 
at <OR>.getDesiredAnchoredChildRect(CoordinatorLayout.java:0) 
at <OR>.layoutChildWithAnchor(CoordinatorLayout.java:0) 
at <OR>.onChildViewsChanged(CoordinatorLayout.java:0) 
at <OR>.offsetChildByInset(CoordinatorLayout.java:0) 
at <OR>.ensurePreDrawListener(CoordinatorLayout.java:0) 
at <OR>.isPointInChildBounds(CoordinatorLayout.java:0) 
at <OR>.generateLayoutParams(CoordinatorLayout.java:0) 
at <OR>.generateLayoutParams(CoordinatorLayout.java:0) 
at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:0) 
at android.view.View.layout(View.java:17945) 
at android.view.ViewGroup.layout(ViewGroup.java:5812) 
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) 
at android.widget.FrameLayout.onLayout(FrameLayout.java:281) 
at android.view.View.layout(View.java:17945) 
at android.view.ViewGroup.layout(ViewGroup.java:5812) 
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1742) 
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) 
at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) 
at android.view.View.layout(View.java:17945) 
at android.view.ViewGroup.layout(ViewGroup.java:5812) 
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) 
at android.widget.FrameLayout.onLayout(FrameLayout.java:281) 
at android.view.View.layout(View.java:17945) 
at android.view.ViewGroup.layout(ViewGroup.java:5812) 
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1742) 
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) 
at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) 
at android.view.View.layout(View.java:17945) 
at android.view.ViewGroup.layout(ViewGroup.java:5812) 
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344) 
at android.widget.FrameLayout.onLayout(FrameLayout.java:281) 
at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:3178) 
at android.view.View.layout(View.java:17945) 
at android.view.ViewGroup.layout(ViewGroup.java:5812) 
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2716) 
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2417) 
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1487) 
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7450) 
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920) 
at android.view.Choreographer.doCallbacks(Choreographer.java:695) 
at android.view.Choreographer.doFrame(Choreographer.java:631) 
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906) 
at android.os.Handler.handleCallback(Handler.java:739) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:158) 
at android.app.ActivityThread.main(ActivityThread.java:7237) 
at java.lang.reflect.Method.invoke(Method.java:0) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 

我固定此错误,这个问题是在getItemViewType方法,而不是在第一个显示的一个(getItemCount)。所以这些堆栈跟踪与以前的堆栈相比是无用的。你知道有一个错误,但你不知道它究竟发生了什么。

您是否遇到过相同的问题? 有人知道如何解决它吗?

回答

0

我认为这是因为当行号被省略时,proguard回溯不能明确地识别堆栈帧(参见https://www.guardsquare.com/en/proguard/manual/retrace#without)。

从这些文档中,它看起来像保留LineNumberTable以消除歧义是必要的。

+0

我不认为它是相关的。根据文件,在这种情况下,日志应该指出“未知来源”。方法顺序不是不明确的。此外,我在崩溃日志中遇到的一些例外情况包含行号并且没有歧义。 –

相关问题