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

Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: FragmentPagerItem:Position #160

Closed
hekaidaqaz opened this issue Oct 31, 2017 · 4 comments

Comments

@hekaidaqaz
Copy link

hekaidaqaz commented Oct 31, 2017

Look at here

  • → Did you conform to the Rules?
  • → Did you read the Wiki Carefully?
  • → Did you search in Google?
  • → Did you search in openned&closed Issues?
  • Receive only bugs and suggestions

MVPArms Version:

AndroidStudio Version:

Target Android Version:

Bug Description:

自己平时没遇见,通过日志平台抓取,部分手机报这个错误

Related Code:

  

    protected FragmentDelegateImpl(Parcel in) {
        this.mFragmentManager = in.readParcelable(FragmentManager.class.getClassLoader());
        this.mFragment = in.readParcelable(Fragment.class.getClassLoader());
        this.iFragment = in.readParcelable(IFragment.class.getClassLoader());
        this.mUnbinder = in.readParcelable(Unbinder.class.getClassLoader());
    }

    public static final Creator<FragmentDelegateImpl> CREATOR = new Creator<FragmentDelegateImpl>() {
        @Override
        public FragmentDelegateImpl createFromParcel(Parcel source) {
            return new FragmentDelegateImpl(source);
        }

        @Override
        public FragmentDelegateImpl[] newArray(int size) {
            return new FragmentDelegateImpl[size];
        }
    };

Bug Log:


`

Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: FragmentPagerItem:Position
--
at android.os.Parcel.readParcelableCreator(Parcel.java:2563)
at android.os.Parcel.readParcelable(Parcel.java:2489)
at com.jess.arms.base.delegate.FragmentDelegateImpl.<init>(FragmentDelegateImpl.java:132)
at com.jess.arms.base.delegate.FragmentDelegateImpl$1.createFromParcel(FragmentDelegateImpl.java:141)
at com.jess.arms.base.delegate.FragmentDelegateImpl$1.createFromParcel(FragmentDelegateImpl.java:138)
at android.os.Parcel.readParcelable(Parcel.java:2498)
at android.os.Parcel.readValue(Parcel.java:2381)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2759)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.Bundle.getParcelable(Bundle.java:864)
at com.jess.arms.integration.ActivityLifecycle$FragmentLifecycle.fetchFragmentDelegate(ActivityLifecycle.java:283)
at com.jess.arms.integration.ActivityLifecycle$FragmentLifecycle.onFragmentAttached(ActivityLifecycle.java:171)
at android.support.v4.app.FragmentManagerImpl.dispatchOnFragmentAttached(FragmentManager.java:3144)
at android.support.v4.app.FragmentManagerImpl.dispatchOnFragmentAttached(FragmentManager.java:3136)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1241)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:2893)
at android.support.v4.app.Fragment.restoreChildFragmentState(Fragment.java:1294)
at android.support.v4.app.Fragment.onCreate(Fragment.java:1265)
at com.trello.rxlifecycle2.components.support.RxFragment.onCreate(RxFragment.java:64)
at com.utoo.passenger.mvp.ui.fragment.BaseFragment.onCreate(BaseFragment.java:50)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2180)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1244)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:2893)
at android.support.v4.app.FragmentController.dispatchCreate(FragmentController.java:190)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:353)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:85)
at com.trello.rxlifecycle2.components.support.RxAppCompatActivity.onCreate(RxAppCompatActivity.java:59)
at com.utoo.passenger.mvp.ui.activity.BaseActivity.onCreate(BaseActivity.java:82)
at android.app.Activity.performCreate(Activity.java:6967)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2772)

`

Others

我感觉是代理实现类FragmentDelegateImpl的问题,最近看日志记录很多手机都打印这个错误,但是,我自己在手机上测试又不重现,只能通过日志记录平台看见这些,

@JessYanCoding
Copy link
Owner

Fixed and close the issues ce41ad8

@JessYanCoding
Copy link
Owner

下个版本 release

@tulongchao
Copy link

这个BUG能在2.2.3版本解决吗,我现在升级到最新版本报错Error:Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.

@JessYanCoding
Copy link
Owner

JessYanCoding commented Dec 19, 2017

@tulongchao 不是提示你用 Java 1.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

3 participants