Google Maps CreatorImpl未正确初始化错误

时间:2017-06-14 02:41:48

标签: android android-mapview

在我的应用程序长时间不活动后崩溃时出现问题。这似乎与CreatorImpl not initialized properly.

有关

这是我的完整logcat响应:

.... java.lang.IllegalStateException: CreatorImpl not initialized properly.
                                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2452)
                                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2535)
                                  at android.app.ActivityThread.access$900(ActivityThread.java:155)
                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
                                  at android.os.Handler.dispatchMessage(Handler.java:102)
                                  at android.os.Looper.loop(Looper.java:152)
                                  at android.app.ActivityThread.main(ActivityThread.java:5497)
                                  at java.lang.reflect.Method.invoke(Native Method)
                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                  Caused by: java.lang.IllegalStateException: CreatorImpl not initialized properly.
                                  at com.google.maps.api.android.lib6.common.l.a(:com.google.android.gms.DynamiteModulesB:14)
                                  at com.google.android.gms.maps.internal.CreatorImpl.newMapViewDelegate(:com.google.android.gms.DynamiteModulesB:26)
                                  at com.google.android.gms.maps.internal.g.onTransact(:com.google.android.gms.DynamiteModulesB:51)
                                  at android.os.Binder.transact(Binder.java:401)
                                  at uni.newMapViewDelegate(:com.google.android.gms:3)
                                  at com.google.android.gms.maps.internal.CreatorImpl.newMapViewDelegate(:com.google.android.gms:1)
                                  at unh.onTransact(:com.google.android.gms:22)
                                  at android.os.Binder.transact(Binder.java:401)
                                  at com.google.android.gms.internal.zzed.zza(Unknown Source)
                                  at com.google.android.gms.maps.internal.zzf.zza(Unknown Source)
                                  at com.google.android.gms.maps.MapView$zzb.zza(Unknown Source)
                                  at com.google.android.gms.dynamic.zza.zza(Unknown Source)
                                  at com.google.android.gms.dynamic.zza.onCreate(Unknown Source)
                                  at com.google.android.gms.maps.MapView.onCreate(Unknown Source)
                                  at com.application.fragments.nav_drawer_directory.c_attending.FragmentWeekendExp.onCreateView(FragmentWeekendExp.java:109)
                                  at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192)
                                  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299)
                                  at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
                                  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
                                  at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2900)
                                  at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:201)
                                  at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:603)
                                  at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178)
                                  at com.application.MainActivity.onStart(MainActivity.java:124)
                                  at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1277)
                                  at android.app.Activity.performStart(Activity.java:6306)
                                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2415)
                                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2535) 
                                  at android.app.ActivityThread.access$900(ActivityThread.java:155) 
                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380) 
                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                  at android.os.Looper.loop(Looper.java:152) 
                                  at android.app.ActivityThread.main(ActivityThread.java:5497) 
                                  at java.lang.reflect.Method.invoke(Native Method) 
                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2452)
                                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2535)
                                  at android.app.ActivityThread.access$900(ActivityThread.java:155)
                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
                                  at android.os.Handler.dispatchMessage(Handler.java:102)
                                  at android.os.Looper.loop(Looper.java:152)
                                                                                    at android.app.ActivityThread.main(ActivityThread.java:5497)
                                  at java.lang.reflect.Method.invoke(Native Method)
                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                  Caused by: java.lang.IllegalStateException: CreatorImpl not initialized properly.
                                  at com.google.maps.api.android.lib6.common.l.a(:com.google.android.gms.DynamiteModulesB:14)
                                  at com.google.android.gms.maps.internal.CreatorImpl.newMapViewDelegate(:com.google.android.gms.DynamiteModulesB:26)
                                  at com.google.android.gms.maps.internal.g.onTransact(:com.google.android.gms.DynamiteModulesB:51)
                                  at android.os.Binder.transact(Binder.java:401)
                                  at uni.newMapViewDelegate(:com.google.android.gms:3)
                                  at com.google.android.gms.maps.internal.CreatorImpl.newMapViewDelegate(:com.google.android.gms:1)
                                  at unh.onTransact(:com.google.android.gms:22)
                                  at android.os.Binder.transact(Binder.java:401)
                                  at com.google.android.gms.internal.zzed.zza(Unknown Source)
                                  at com.google.android.gms.maps.internal.zzf.zza(Unknown Source)
                                  at com.google.android.gms.maps.MapView$zzb.zza(Unknown Source)
                                  at com.google.android.gms.dynamic.zza.zza(Unknown Source)
                                  at com.google.android.gms.dynamic.zza.onCreate(Unknown Source)
                                  at com.google.android.gms.maps.MapView.onCreate(Unknown Source)
                                  at com.application.fragments.nav_drawer_directory.c_attending.FragmentWeekendExp.onCreateView(FragmentWeekendExp.java:109)
                                  at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192)
                                  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299)
                                  at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
                                  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
                                  at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2900)
                                  at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:201)
                                  at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:603)
                                  at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178)
                                  at com.application.MainActivity.onStart(MainActivity.java:124)
                                  at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1277)
                                  at android.app.Activity.performStart(Activity.java:6306)
                                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2415)
                                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2535) 
                                  at android.app.ActivityThread.access$900(ActivityThread.java:155) 
                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380) 
                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                  at android.os.Looper.loop(Looper.java:152) 
                                  at android.app.ActivityThread.main(ActivityThread.java:5497) 
                                  at java.lang.reflect.Method.invoke(Native Method) 
                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

崩溃的地方在这里:

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment

    View parentView = inflater.inflate(R.layout.ad_weekendexp_frag, container, false);

    //Setup map, using a custom one to prevent scrollview from scrolling when the user is
    //touching down on the map
    mMapView = (CustomMapView) parentView.findViewById(R.id.wkndExpMapview);
(--> crash here)       mMapView.onCreate(savedInstanceState);
    mMapView.getMapAsync(this);

    //Initialize Views
    findViews(parentView);

    //Set up clickables, any that may be used here
    setupClickables();

    //Sets up the recycler view which will display the list which has details of what to expect
    //on any given service on the weekend
    setupSvcDescipList();

    //Prevent the background from being transparent
    parentView.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.colorSecondary));


    return parentView;

另外,作为附注,我还根据设置mapview的指南覆盖了onCreate(), onPause(), ect。所有帮助表示赞赏!感谢

0 个答案:

没有答案