Method 'java.lang.String c.e.c.a.a()' is inaccessible to class 'c.e.b.a.a.e' (declaration of 'c.e.b.a.a.e' appears in /XXX-Fa8I9XMskRAXduIQ2mvFCg==/base.apk
Android API: 29
Mapbox Navigation SDK version: 0.33.2
No crash.
Fatal Exception: java.lang.IllegalAccessError
Method 'java.lang.String c.e.c.a.a()' is inaccessible to class 'c.e.b.a.a.e' (declaration of 'c.e.b.a.a.e' appears in /XXX-Fa8I9XMskRAXduIQ2mvFCg==/base.apk)
com.mapbox.api.directions.v5.DirectionsResponseFactory.generateRouteOptions (DirectionsResponseFactory.java:75)
com.mapbox.api.directions.v5.DirectionsResponseFactory.a (DirectionsResponseFactory.java:28)
com.mapbox.api.directions.v5.MapboxDirections$1.onResponse (MapboxDirections.java:128)
retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run (ExecutorCallAdapterFactory.java:71)
android.os.Handler.handleCallback (Handler.java:873)
Thanks for the report @hrach. We will look into this and report back. From first glance, it looks like a possible issue in our upstream Java SDK. Will move the ticket there if we deem this is the case.
cc @osana
Thanks, I'm not sure it I can somehow mitigate this with additional rule, so if there is a way, I would be glad to know :)
i have the same problem
Here it is a little bit strange... when running in a device by android studio works just fine... then I generate an apk and copy to my phone and it crashes, but in a friend's pocophone it also crashes but I can see an error details.
In my phone only crashes without error message, so i can't figured out what it is the problem
This works with proguard without R8 (same rules). Is this an issue in the mapbox side or r8 itself?
Came across same problem.
This seems like a bug in R8 i did some investigation and actually ended up opening an issue on R8 tracker 馃檲 lets see what they say : https://issuetracker.google.com/issues/136195382
Until it's resolved i have reverted to using proguard
Issue was confirmed as a bug in R8 shrinker and received a fix - we will need to wait till its listed in new build tools release or specify r8 version manually until then.
There is also temporary workaround including adding new proguard rule:
-keep class com.mapbox.api.directions.v5.MapboxDirections { protected <methods>; }
cc @danesfeder
Closing. Fix is on the way and workaround is possible ^^^.
any news?
Most helpful comment
Issue was confirmed as a bug in R8 shrinker and received a fix - we will need to wait till its listed in new build tools release or specify r8 version manually until then.
There is also temporary workaround including adding new proguard rule:
cc @danesfeder