当前位置: 首页 > 知识库问答 >
问题:

AndroidRuntime:致命异常:androidmapsapi-ZoomTableManager

华阳秋
2023-03-14
Process: com.currentlocation.android, PID: 7328
    java.lang.ArrayIndexOutOfBoundsException: length=1; index=12
        at com.google.maps.api.android.lib6.gmm6.vector.ct.<init>(:com.google.android.gms.dynamite_mapsdynamite@201216081@20.12.16 (120400-0):9)
        at com.google.maps.api.android.lib6.gmm6.vector.cv.a(:com.google.android.gms.dynamite_mapsdynamite@201216081@20.12.16 (120400-0):23)
        at com.google.maps.api.android.lib6.gmm6.util.m.run(:com.google.android.gms.dynamite_mapsdynamite@201216081@20.12.16 (120400-0):14)
        at java.lang.Thread.run(Thread.java:919)

在v3 beta版SDK中,堆栈跟踪是:

2020-04-23 15:59:06.064 E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example, PID: 22717
    java.lang.ArrayIndexOutOfBoundsException: length=1; index=12
        at com.google.android.libraries.maps.bv.zzbs.<init>(ZoomTable.java:24)
        at com.google.android.libraries.maps.bv.zzbv.zza(ZoomTableQuadTree.java:57)
        at com.google.android.libraries.maps.br.zzd.zza(Unknown Source:4)
        at com.google.android.libraries.maps.hi.zzas.zza(Suppliers.java:7)
        at com.google.android.libraries.maps.br.zza.zzh(SharedMapComponentImpl.java:58)
        at com.google.android.libraries.maps.gu.zzat.zza(RendererFactoryImpl.java:88)
        at com.google.android.libraries.maps.it.zzav.zza(GoogleMapImpl.java:59)
        at com.google.android.libraries.maps.it.zzci.zza(MapFragmentDelegateImpl.java:3)
        at com.google.android.libraries.maps.it.zzcg.zza(MapFragmentDelegateImpl.java:15)
        at com.google.android.libraries.maps.SupportMapFragment$zza.onCreateView(SupportMapFragment.java:15)
        at com.google.android.gms.dynamic.zae.zaa(com.google.android.gms:play-services-base@@17.1.0:4)
        at com.google.android.gms.dynamic.DeferredLifecycleHelper.zaa(com.google.android.gms:play-services-base@@17.1.0:9)
        at com.google.android.gms.dynamic.DeferredLifecycleHelper.onCreateView(com.google.android.gms:play-services-base@@17.1.0:25)
        at com.google.android.libraries.maps.SupportMapFragment.onCreateView(SupportMapFragment.java:34)
        at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2698)
        at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:310)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1185)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1354)
        at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1432)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1495)
        at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2617)
        at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2569)
        at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:2722)
        at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:336)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1186)
        at androidx.fragment.app.FragmentManager.addAddedFragments(FragmentManager.java:2222)
        at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1995)
        at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1951)
        at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1847)
        at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2621)
        at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2569)
        at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:2722)
        at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:336)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1186)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1354)
        at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1432)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1495)
        at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2617)
        at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2569)
        at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:247)
        at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:541)
        at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:201)
        at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1432)
        at android.app.Activity.performStart(Activity.java:7848)
        at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3294)
2020-04-23 15:59:06.064 E/AndroidRuntime:     at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
        at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

病因是什么?

共有1个答案

易成双
2023-03-14
adb shell dumpsys activity provider com.google.android.gms.chimera.container.GmsModuleProvider

您应该看到module sets部分中列出的module Set id:maps行。

Module Set ID: maps, Module Set Version: 2015120015120000

Android v2的地图SDK崩溃率恢复正常。

到目前为止,如果您还没有用下面提到的客户端代码解决方案更新您的应用程序,您不需要采取进一步的操作。

播放商店审核批准

如果您更新您的应用程序,但体验播放商店审查批准延迟,请用您的应用程序的包ID:?提交一个支持案例,联系支持团队。我们的支持团队将在内部升级您的请求,并加快批准。

谷歌Play商店的负面评论

通过此更新,我们将关闭此问题。感谢大家的耐心。我们的团队正在对这一事件进行深入的内部调查;我们将尽快发布我们的分析(大约在一周内)。与此同时,如果你有任何问题,或者仍然遇到问题,请提交支持案例。

>

  • Android上的最终用户可以清除受影响的应用程序的数据(不仅仅是缓存)。

    iOS上的最终用户可以卸载然后重新安装受影响的应用程序。

    let key = "GoogleMapsServerControlledParamsKey_bug_154855417"
    if !UserDefaults.standard.bool(forKey: key) {
        let urls = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)
        if urls.count > 0 {
            let paramUrl = urls[0].appendingPathComponent("com.google.GoogleMaps/ServerControlledParams", isDirectory: false)
            try? FileManager.default.removeItem(at: paramUrl)
        }
        UserDefaults.standard.set(true, forKey: key)
    }
    
    NSString *key = @"GoogleMapsServerControlledParamsKey_bug_154855417";
    BOOL keyExists = [[NSUserDefaults standardUserDefaults] boolForKey:key];
    if (!keyExists) {
        NSArray<NSURL *> *array =
            [[NSFileManager defaultManager] URLsForDirectory:NSApplicationSupportDirectory
                                                   inDomains:NSUserDomainMask];
        if (array.count > 0) {
            NSURL *url =
                [array[0] URLByAppendingPathComponent:@"com.google.GoogleMaps/ServerControlledParams"
                                          isDirectory:NO];
            if (url) {
                [[NSFileManager defaultManager] removeItemAtURL:url error:NULL];
            }
        }
        [[NSUserDefaults standardUserDefaults] setBool:YES forKey:key];
    }
    

    Android的代码解决方案:

    建议将代码放在application.onCreate()中:

    爪哇

    try {
      SharedPreferences hasFixedGoogleBug154855417 = getSharedPreferences("google_bug_154855417", Context.MODE_PRIVATE);
      if (!hasFixedGoogleBug154855417.contains("fixed")) {
        File corruptedZoomTables = new File(getFilesDir(), "ZoomTables.data");
        File corruptedSavedClientParameters = new File(getFilesDir(), "SavedClientParameters.data.cs");
        File corruptedClientParametersData =
            new File(
              getFilesDir(),
              "DATA_ServerControlledParametersManager.data."
                  + getBaseContext().getPackageName());
        File corruptedClientParametersDataV1 =
            new File(
              getFilesDir(),
              "DATA_ServerControlledParametersManager.data.v1."
                  + getBaseContext().getPackageName());
        corruptedZoomTables.delete();
        corruptedSavedClientParameters.delete();
        corruptedClientParametersData.delete();
        corruptedClientParametersDataV1.delete();
        hasFixedGoogleBug154855417.edit().putBoolean("fixed", true).apply();
      }
    } catch (Exception e) {
    
    }
    
    try {
        val sharedPreferences = getSharedPreferences("google_bug_154855417", Context.MODE_PRIVATE)
        if (!sharedPreferences.contains("fixed")) {
            val corruptedZoomTables = File(filesDir, "ZoomTables.data")
            val corruptedSavedClientParameters = File(filesDir, "SavedClientParameters.data.cs")
            val corruptedClientParametersData = File(filesDir, "DATA_ServerControlledParametersManager.data.${packageName}")
            val corruptedClientParametersDataV1 = File(filesDir, "DATA_ServerControlledParametersManager.data.v1.${packageName}")
            corruptedZoomTables.delete()
            corruptedSavedClientParameters.delete()
            corruptedClientParametersData.delete()
            corruptedClientParametersDataV1.delete()
            sharedPreferences.edit().putBoolean("fixed", true).apply()
        }
    } catch (exception: Exception) {
    
    }
    

  •  类似资料: