SecurityException: Parcel.readException coming from google analytics code SecurityException: Parcel.readException coming from google analytics code android android

SecurityException: Parcel.readException coming from google analytics code


It's a SecurityException means this is not happening because of our own function. (Mostly system code throw these exception).

and system uses (android.app.ApplicationThread) to register a broadcast.

Unless it is happening on all devices i can say it's because of bad GMS configuration (Google play service).

What you can do is wrap all analytics call with try catch (where you only catch Security exception).

I am not 100% sure but i will add more info after i try it my self.


My guess is that you are running ProGuard on your application but haven't added the following exceptions to your proguard-rules.txt:

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {    public static final *** NULL;}-keepnames @com.google.android.gms.common.annotation.KeepName class *-keepclassmembernames class * {    @com.google.android.gms.common.annotation.KeepName *;}-keepnames class * implements android.os.Parcelable {    public static final ** CREATOR;}