随机 MapView 强制关闭:NullPointerException com.google.googlenav.map.Tile.getTile

发布于 2024-10-22 00:36:14 字数 2179 浏览 7 评论 0原文

我真的需要一些帮助。我有一份关于此堆栈跟踪强制关闭的报告,但我找不到任何有关如何防止的信息,也无法复制此类错误。我希望有人能够了解为什么会发生这种情况。

com.google.googlenav.map.Tile.getTile(Unknown Source)
com.google.googlenav.map.Tile.read(Unknown Source)
com.google.googlenav.map.MapTile.read(Unknown Source)
com.google.googlenav.map.FlashRecord.loadTileFromDataEntry(Unknown Source)
com.google.googlenav.map.FlashRecord.loadTile(Unknown Source)
com.google.googlenav.map.MapFlashService.loadFlashRecordTile(Unknown Source)
com.google.googlenav.map.MapFlashService.getMapTile(Unknown Source)
com.google.googlenav.map.MapService.getTile(Unknown Source)
com.google.googlenav.map.Map.drawTile(Unknown Source)
com.google.googlenav.map.Map.drawMapBackground(Unknown Source)
com.google.googlenav.map.Map.drawMap(Unknown Source)
com.google.android.maps.MapView.drawMap(MapView.java:1048)
com.google.android.maps.MapView.onDraw(MapView.java:486)
android.view.View.draw(View.java:6739)
android.view.ViewGroup.drawChild(ViewGroup.java:1648)
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1375)
android.view.View.draw(View.java:6742)
android.view.ViewGroup.drawChild(ViewGroup.java:1648)
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1375)
android.view.View.draw(View.java:6742)
android.widget.FrameLayout.draw(FrameLayout.java:352)
android.view.ViewGroup.drawChild(ViewGroup.java:1648)
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1375)
android.view.View.draw(View.java:6742)
android.widget.FrameLayout.draw(FrameLayout.java:352)
com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1872)
android.view.ViewRoot.draw(ViewRoot.java:1422)
android.view.ViewRoot.performTraversals(ViewRoot.java:1167)
android.view.ViewRoot.handleMessage(ViewRoot.java:1744)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:144)
android.app.ActivityThread.main(ActivityThread.java:4937)
java.lang.reflect.Method.invokeNative(Native Method)
java.lang.reflect.Method.invoke(Method.java:521)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
dalvik.system.NativeStart.main(Native Method) 

I really need some help. I have a report of a force close with this stack trace, and I cant find any information on how to prevent, nor can I replicate this type of error. I was hoping someone would have some insight on why this is happening.

com.google.googlenav.map.Tile.getTile(Unknown Source)
com.google.googlenav.map.Tile.read(Unknown Source)
com.google.googlenav.map.MapTile.read(Unknown Source)
com.google.googlenav.map.FlashRecord.loadTileFromDataEntry(Unknown Source)
com.google.googlenav.map.FlashRecord.loadTile(Unknown Source)
com.google.googlenav.map.MapFlashService.loadFlashRecordTile(Unknown Source)
com.google.googlenav.map.MapFlashService.getMapTile(Unknown Source)
com.google.googlenav.map.MapService.getTile(Unknown Source)
com.google.googlenav.map.Map.drawTile(Unknown Source)
com.google.googlenav.map.Map.drawMapBackground(Unknown Source)
com.google.googlenav.map.Map.drawMap(Unknown Source)
com.google.android.maps.MapView.drawMap(MapView.java:1048)
com.google.android.maps.MapView.onDraw(MapView.java:486)
android.view.View.draw(View.java:6739)
android.view.ViewGroup.drawChild(ViewGroup.java:1648)
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1375)
android.view.View.draw(View.java:6742)
android.view.ViewGroup.drawChild(ViewGroup.java:1648)
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1375)
android.view.View.draw(View.java:6742)
android.widget.FrameLayout.draw(FrameLayout.java:352)
android.view.ViewGroup.drawChild(ViewGroup.java:1648)
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1375)
android.view.View.draw(View.java:6742)
android.widget.FrameLayout.draw(FrameLayout.java:352)
com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1872)
android.view.ViewRoot.draw(ViewRoot.java:1422)
android.view.ViewRoot.performTraversals(ViewRoot.java:1167)
android.view.ViewRoot.handleMessage(ViewRoot.java:1744)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:144)
android.app.ActivityThread.main(ActivityThread.java:4937)
java.lang.reflect.Method.invokeNative(Native Method)
java.lang.reflect.Method.invoke(Method.java:521)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
dalvik.system.NativeStart.main(Native Method) 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猫瑾少女 2024-10-29 00:36:14

不是我自己的,但这就是我的 MapView 上修复崩溃的原因

public class TrackMapView extends MapView {
    public TrackMapView(Context context, AttributeSet attrs) {
        super(context, attrs); 
    }

    @Override
    public void draw(Canvas canvas) {
        try {
            if(this.getZoomLevel() >= 21) {
                this.getController().setZoom(20);
            }
            super.draw(canvas);
        }
        catch(Exception ex) {           
            getController().setCenter(this.getMapCenter());
            getController().setZoom(this.getZoomLevel() - 2);
            Log.d("TrackMapView", "Internal error in MapView:" + Log.getStackTraceString(ex));
        }
    }
}

Not my own but this is what fixed crashes on my MapView

public class TrackMapView extends MapView {
    public TrackMapView(Context context, AttributeSet attrs) {
        super(context, attrs); 
    }

    @Override
    public void draw(Canvas canvas) {
        try {
            if(this.getZoomLevel() >= 21) {
                this.getController().setZoom(20);
            }
            super.draw(canvas);
        }
        catch(Exception ex) {           
            getController().setCenter(this.getMapCenter());
            getController().setZoom(this.getZoomLevel() - 2);
            Log.d("TrackMapView", "Internal error in MapView:" + Log.getStackTraceString(ex));
        }
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文