AndroidRuntime: FATAL EXCEPTION: androidmapsapi-ZoomTableManager, java.lang.ArrayIndexOutOfBoundsException: length=1; index=12 [duplicate]

扶醉桌前 提交于 2020-05-10 03:42:05

问题


I have used Google Maps SDK (v2) in my application and today suddenly it started crashing with below crash message:

2020-04-24 02:26:40.874 22678-22758/com.**.**E/AndroidRuntime: FATAL EXCEPTION: androidmapsapi-ZoomTableManager
Process: com.**.**, PID: 22678
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)

Is there anyone who faced this issue before. It would be very helpful if get help to resolve this Fatal exception issue.


回答1:


Google Maps is aware of the issue and working on a fix (link):

According to outage.report, google maps is having troubles at the time of these errors. I suspect this is the cause of these errors.




回答2:


Here’s the Google IssueTracker thread on the issue.

https://issuetracker.google.com/issues/154855417

Latest status:

We believe the crashes of Google Maps SDK are partially resolved. Full resolution is expected to complete by Thursday, 2020-04-23 19:45 US/Pacific.

Possible workaround:

Customers for whom clearing application data is safe can recommend their users clear data for the applications (not just the cache). If there is uncertainty about the safety of clearing application data, users can wait for new data to be fetched within the next 3 hours (many users will see resolution of the problem sooner than this).




回答3:


It's an internal error in Google Maps API, and it is aware of the issue and working on a fix.

References:

  1. FATAL EXCEPTION: androidmapsapi-ZoomTableManager java.lang.ArrayIndexOutOfBoundsException: length=1; index=12
  2. com.google.maps.api.android has a fatal exception
  3. Google Maps SDK is crashing

Update:

If you want your users to continue using your app without re-installing, The sample code is copy-pasted here for your convenience. In Application class:

import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;

import java.io.File;

public class MyApp extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        SharedPreferences googleBug = getSharedPreferences("google_bug_154855417", Context.MODE_PRIVATE);
        if (!googleBug.contains("fixed")) {
            File corruptedZoomTables = new File(getFilesDir(), "ZoomTables.data");
            corruptedZoomTables.delete();
            googleBug.edit().putBoolean("fixed", true).apply();
        }
    }

}

Reference: https://issuetracker.google.com/154855417#comment179




回答4:


Working if you clear app Storage and Cache.

screenshot from mobile




回答5:


It seems to be due to google maps services, I have the same problem and so do a lot of people. The only thing we can do is to wait for the problem to be solved by google .




回答6:


Clear cache data and app data , should fix this issue .




回答7:


I manage to solve the issue by clearing data and restarting the app.




回答8:


Google Maps working on fix this issue. For now if you clear app Storage and Cache it will work.( it works for me right now, but for permanent solution have to wait until google maps fix this issue).




回答9:


Delete com.google.android.gms.maps._m_u and ZoomTables.data

My app stores critical data in App Data. I cannot ask my users to clear App Data without their throwing away years of work. So I looked in the Documents directory of my app and found these two files/directories.

com.google.android.gms.maps._m_u

ZoomTables.data

I can’t tell you how to do this for your app but what I did in my app is write code that only runs one time when my app is next launched and that code deletes those two files/directories which seems to clear the problem. When my app later displays a Google Map, those files/directories are created again but with data that does not cause a crash. Lastly I’ve had to build and release a new version of my app to production. Now I just have to get all my crashing users to use the new version.



来源:https://stackoverflow.com/questions/61397027/androidruntime-fatal-exception-androidmapsapi-zoomtablemanager-java-lang-arra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!