android街景崩溃与nullpointer异常

时间:2017-04-28 19:11:45

标签: java android google-street-view

我们有一项活动,使用StreetViewPanoramaFragment显示特定媒体资源的街道。没有任何变化,我们开始接收街景崩溃。有没有人遇到类似的东西?

这是一个非常简单的布局:

 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <include layout="@layout/toolbar"
        android:id="@+id/toolbar"/>

    <fragment
        android:id="@+id/streetview_fragment"
        android:layout_below="@id/toolbar"
        class="com.google.android.gms.maps.StreetViewPanoramaFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</RelativeLayout>

抛出的异常是:

      NullPointerException (@streetview.bg:a:39246) {main} 
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.maps.api.android.lib6.gmm6.streetview.b.a()' on a null object reference at 
com.google.maps.api.android.lib6.gmm6.streetview.bg.a(:com.google.android.gms.DynamiteModulesB:39246) at com.google.maps.api.android.lib6.gmm6.streetview.bg.onTouchEvent(:com.google.android.gms.DynamiteModulesB:30874) at 

android.view.View.dispatchTouchEvent(View.java:9150) at

 android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2687) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2362) at 

android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2687) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2362) at 

android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2687) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2362) at 

android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2687) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2362) at

 android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2687) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2362) at 

android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2687) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2362) at 

android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2687) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2362) at

 android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2687) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2362) at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2740) at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1832) at android.app.Activity.dispatchTouchEvent(Activity.java:2944) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2701) at android.view.View.dispatchPointerEvent(View.java:9360) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4978) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4739) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4271) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4324) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4290) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4416) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4298) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4473) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4271) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4324) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4290) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4298) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4271) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6866) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6747) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6718) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6956) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:143) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:6837) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

0 个答案:

没有答案