Google Maps API SDK Crash

Viewed 612

I have an navigation app that uses offline tiles along with google maps api v2.

The first time I open the app, the api connects to google server so it can download google play certificate ( I think) and then it works with the oflline tiles that are stored in the device. After the first connection, the application can stay offline and continue to work fine.

In my last build, after 3-4 days of using the app, the offline (tiles,markers,polygons,etc) capability is lost and the api needs to connect again to the internet as to continue function.

When I go online then the application starts to work again.

What I have done until now:

  • Checked that the google maps api key is correct (it works fine when I connect to the internet)
  • Add the application SHA to the google api console
  • Try restricted/unrestricted of the api key

I attach three logcat when opening the app

1)Opening the app offline and the google api doesnt work:

W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@ae82085
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:203113001
I/DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 203113001
V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
W/: Unknown chunk type '200'.
W/: Unsupported class loader
/: Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API: Google Play services client version: 12451000
I/Google Maps Android API: Google Play services package version: 212418024
I/Google Maps Android API: Google Play services maps renderer version(legacy): 203113001
W/: Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
W/tb: Invoking recovery actions due to previous crash loop detection.
W/sx: Marker deleted: _google_maps_sdk_recovery_needed_
W/sx: Marker deleted: _google_maps_sdk_crash_count_2
W/tb: Crash loop detection recovery actions completed.
W/sx: File created: _google_maps_sdk_crash_count_1
W/sx: Couldn't create marker: _google_maps_sdk_crash_
W/libEGL: EGLNativeWindowType 0xe360f008 disconnect failed
W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:6
I/DynamiteModule: Selected remote version of com.google.android.gms.googlecertificates, version >= 6
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader

2)After the google maps api fail, I go online and this is the logcat from the next start (the maps start working again)

W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@ae82085
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:203113001
I/DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 203113001
W/: Unknown chunk type '200'.
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API: Google Play services client version: 12451000
I/Google Maps Android API: Google Play services package version: 212418024
I/Google Maps Android API: Google Play services maps renderer version(legacy): 203113001
W/: Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
W/sx: File created: _google_maps_sdk_crash_count_2
W/sx: Marker deleted: _google_maps_sdk_crash_count_1
W/sx: Couldn't create marker: _google_maps_sdk_crash_
W/libEGL: EGLNativeWindowType 0xe360f008 disconnect failed
W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:6
I/DynamiteModule: Selected remote version of com.google.android.gms.googlecertificates, version >= 6
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader

3)This is logcat from next starts of the app being OFFLINE and the api is still working.

W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@ae82085
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:203113001
I/DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 203113001
W/: Unknown chunk type '200'.
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API: Google Play services client version: 12451000
I/Google Maps Android API: Google Play services package version: 212418024
I/Google Maps Android API: Google Play services maps renderer version(legacy): 203113001
W/: Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
W/sx: File created: _google_maps_sdk_recovery_needed_
W/sx: Marker deleted: _google_maps_sdk_crash_count_2
W/sx: Couldn't create marker: _google_maps_sdk_crash_
W/libEGL: EGLNativeWindowType 0xe360f008 disconnect failed
W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:6
I/DynamiteModule: Selected remote version of com.google.android.gms.googlecertificates, version >= 6
W/: Unsupported class loader
W/: Skipping duplicate class check due to unsupported classloader

One difference I can spot is on line #6 V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils when the google maps api stops to work.

Maybe its something with my dependecies?

    implementation files('libs/common-lang3.jar')
    implementation 'com.android.support:support-v13:28.0.0'
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.google.android.gms:play-services-maps:16.1.0'
    implementation 'com.google.maps.android:android-maps-utils:2.1.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'org.jetbrains:annotations-java5:15.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:2.0.4'
    implementation 'com.android.support:preference-v7:28.0.0'
    implementation 'org.apache.commons:commons-io:1.3.2'
0 Answers
Related