Android E/Parcel﹕ Class not found when unmarshalling (only on Samsung Tab3)

For some strange reason it looks like the class loader isn’t set up properly.

Try one of the following in TestActivity.onCreate():

TestParcel cfgOptions = getIntent().getParcelableExtra("cfgOptions");

Intent intent = getIntent();
TestParcel cfgOptions = intent.getParcelableExtra("cfgOptions");

Bundle extras = getIntent().getExtras();
TestParcel cfgOptions = extras.getParcelable("cfgOptions");

Alternatively, wrap the parcelable into a bundle:

Bundle b = new Bundle();
b.putParcelable("options", cfgOptions);
Intent intent = new Intent(MDex.this, TestActivity.class);
intent.putExtra("bundle", b);

to get:

Bundle b = getIntent().getBundleExtra("bundle");
TestParcel cfgOptions = b.getParcelable("options");

Leave a Comment