Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Release Build with r8 code shrinker #36

Open
sanjaychans opened this issue Mar 2, 2021 · 1 comment
Open

Crash on Release Build with r8 code shrinker #36

sanjaychans opened this issue Mar 2, 2021 · 1 comment

Comments

@sanjaychans
Copy link

Application crashes on release build with the following stack trace. This is a Xamarin Forms application.
Any help is appreciated.

GeofenceImplementation.IsLocationEnabled (System.Action`1[T] returnAction)
Java.Lang.IncompatibleClassChangeError: no "Lcom/google/android/gms/location/SettingsApi;" field "SettingsApi" in class "Lcom/google/android/gms/location/LocationServices;" or its superclasses

Stack traces
Java.Interop
JniEnvironment+StaticFields.GetStaticFieldID (Java.Interop.JniObjectReference type, System.String name, System.String signature)
Java.Interop
JniType.GetStaticField (System.String name, System.String signature)
Java.Interop
JniPeerMembers+JniStaticFields.GetFieldInfo (System.String encodedMember)
Java.Interop
JniPeerMembers+JniStaticFields.GetObjectValue (System.String encodedMember)
Android.Gms.Location
LocationServices.get_SettingsApi ()
Plugin.Geofence
GeofenceImplementation.IsLocationEnabled (System.Action1[T] returnAction) Plugin.Geofence.GeofenceImplementation Plugin.Geofence.GeofenceImplementation..ctor () [0x00032] in <70d71c13fc584d2a938433caf7e25ac4>:0 Plugin.Geofence CrossGeofence.CreateGeofence () Plugin.Geofence.CrossGeofence+<>c <.cctor>b__55_0 () System Lazy1[T].PublicationOnlyViaFactory (System.LazyHelper initializer)
System
Lazy1[T].CreateValue () System Lazy1[T].get_Value ()
Plugin.Geofence
CrossGeofence.get_Current ()
Dispatch.Mobile.Core.Services.Data
GeofenceDataService.StartGeoFenceMonitoring (System.String orderNumber)
Dispatch.Mobile.Core.ViewModels.PendingOrderViewModel
StartOrderPageViewModel.StartGeoFencingServices ()
Dispatch.Mobile.Core.ViewModels.PendingOrderViewModel
StartOrderPageViewModel.StartNewOrder ()
java.lang.NoSuchFieldError: no "Lcom/google/android/gms/location/SettingsApi;" field "SettingsApi" in class "Lcom/google/android/gms/location/LocationServices;" or its superclasses
crc643f46942d9dd1fff9.ButtonRenderer_ButtonClickListener.n_onClick(Native Method)
crc643f46942d9dd1fff9.ButtonRenderer_ButtonClickListener.onClick(Unknown Source:0)
android.view.View.performClick View.java:7201
android.view.View.performClickInternal View.java:7170
android.view.View.access$3500 View.java:806
android.view.View$PerformClick.run View.java:27562
android.os.Handler.handleCallback Handler.java:883
android.os.Handler.dispatchMessage Handler.java:100
android.os.Looper.loop Looper.java:214
android.app.ActivityThread.main ActivityThread.java:7682
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:516
com.android.internal.os.ZygoteInit.main ZygoteInit.java:950

android options

@sanjaychans sanjaychans changed the title Crash on Release Build with d8 code shrinker Crash on Release Build with r8 code shrinker Mar 2, 2021
@alanhoman
Copy link

I am having the same issue and had to revert back to 1.5.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants