Class not found when unmarshalling when installing an app via Fabric Beta

2.5k views Asked by At

I'm having this strange error when users are installing my app via Fabric's Beta causing the install to fail. This seems to only affect Samsung devices.

Class not found when unmarshalling: com.android.packageinstaller.InstallFlowAnalytics
                                     java.lang.ClassNotFoundException: com.android.packageinstaller.InstallFlowAnalytics
                                         at java.lang.Class.classForName(Native Method)
                                         at java.lang.Class.forName(Class.java:324)
                                         at android.os.Parcel.readParcelableCreator(Parcel.java:2404)
                                         at android.os.Parcel.readParcelable(Parcel.java:2358)
                                         at android.os.Parcel.readValue(Parcel.java:2264)
                                         at android.os.Parcel.readArrayMapInternal(Parcel.java:2614)
                                         at android.os.BaseBundle.unparcel(BaseBundle.java:221)
                                         at android.os.BaseBundle.getString(BaseBundle.java:920)
                                         at android.content.Intent.getStringExtra(Intent.java:6183)
                                         at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:2695)
                                         at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:2157)
                                         at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:6337)
                                         at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:6115)
                                         at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:170)
                                         at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3985)
                                         at android.os.Binder.execTransact(Binder.java:453)
                                      Caused by: java.lang.ClassNotFoundException: com.android.packageinstaller.InstallFlowAnalytics
                                         at java.lang.Class.classForName(Native Method)
                                         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                                         at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                         at java.lang.Class.classForName(Native Method) 
                                         at java.lang.Class.forName(Class.java:324) 
                                         at android.os.Parcel.readParcelableCreator(Parcel.java:2404) 
                                         at android.os.Parcel.readParcelable(Parcel.java:2358) 
                                         at android.os.Parcel.readValue(Parcel.java:2264) 
                                         at android.os.Parcel.readArrayMapInternal(Parcel.java:2614) 
                                         at android.os.BaseBundle.unparcel(BaseBundle.java:221) 
                                         at android.os.BaseBundle.getString(BaseBundle.java:920) 
                                         at android.content.Intent.getStringExtra(Intent.java:6183) 
                                         at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:2695) 
                                         at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:2157) 
                                         at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:6337) 
                                         at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:6115) 
                                         at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:170) 
                                         at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3985) 
                                         at android.os.Binder.execTransact(Binder.java:453) 
                                      Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

Has anyone else seen this or know what might be causing it? Thanks

2

There are 2 answers

1
scottyab On

We had a similar install issue with Fabric Beta with Samsung specifically.

It occurred when we android:extractNativeLibs="false" - after a recent version of Android Studio started suggesting it as a lint fix.

So the workaround/fix until Fabric make fix this was to ensure android:extractNativeLibs="true"

0
Budi Mulyo On

Try this

I had the same problem when I built my app with only V2 (Full APK Signature) option in Studio. I have now selected V1 (Jar Signature) and V2 (Full APK Signature) and it works.

Got same problem, this solve my problem. From Cannot update the app after updating SDK (app not installed)..