3

Started seeing this crash in our app:

E/AndroidRuntime: FATAL EXCEPTION: main
  Process: com.example.debug, PID: 25873
                java.lang.IllegalArgumentException: Unexpected number of IObjectWrapper declared fields: 3
            at pvq.a(:com.google.android.gms@11951440:9)
      at com.google.android.gms.maps.internal.CreatorImpl.newMapViewDelegate(:com.google.android.gms@11951440:1)
      at xdh.onTransact(:com.google.android.gms@11951440:17)
      at android.os.Binder.transact(Binder.java:507)
      at com.google.android.gms.maps.internal.zzc$zza$zza.zza(Unknown Source)
      at com.google.android.gms.maps.MapView$zzb.zzJz(Unknown Source)
      at com.google.android.gms.maps.MapView$zzb.zza(Unknown Source)
      at com.google.android.gms.dynamic.zza.zza(Unknown Source)
      at com.google.android.gms.dynamic.zza.onCreate(Unknown Source)
      at com.google.android.gms.maps.MapView.onCreate(Unknown Source)
      at com.example.presenters.MyFragment.onCreateView(MyFragment.java:175)

The solutions is always to clean and rebuild the project. This makes me think this is maybe a Proguard thing.

We are using these play services libs:

implementation "com.google.android.gms:play-services-maps:11.0.1"
implementation "com.google.android.gms:play-services-gcm:11.0.1"
implementation "com.google.android.gms:play-services-location:11.0.1"

I'm not sure if there is a fix for this in the latest version of play services, but at the moment we are not in a position to upgrade past play services 11.2 (we aren't bumping compile/target SDK to 26 yet).

So...

Am I right, this is a proguard issue? If so how is there a fix in 11.2 and up? If I don't upgrade play services, how can I fix this?

tir38
  • 9,810
  • 10
  • 64
  • 107

1 Answers1

7

I saw the same crash when I turned on code shrinking in debug builds. The solution was to disable Instant Run