BadParcelableException:unmarshalling:com.android.mail.providers.Account

时间:2013-12-09 23:14:52

标签: android email android-intent classloader

我知道这看起来很复杂。但是,我找不到解决方案..

我有一个应用程序,我尝试使用Intent过滤器

android.intent.action.VIEW

当我触摸电子邮件ID时,它会打开我的活动。但抛出BadParcelableException: unmarshalling: com.android.mail.providers.Account

我尝试将ClassLoader设置为捆绑包。但是没有用。

Bundle bundle = getIntent().getExtras() ;
bundle.setClassLoader(getClassLoader()) ;

根据其他帖子,他们只是说getClass().getClassLoader()

我的问题是类加载器的价值应该是什么?

请指出正确的方向。

提前致谢。

堆栈跟踪:

android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.android.mail.providers.Account
    at android.os.Parcel.readParcelable(Parcel.java:2077)
    at android.os.Parcel.readValue(Parcel.java:1965)
    at android.os.Parcel.readMapInternal(Parcel.java:2226)
    at android.os.Bundle.unparcel(Bundle.java:223)
    at android.os.Bundle.getBoolean(Bundle.java:802)
    at android.content.Intent.getBooleanExtra(Intent.java:4354)
    at com.example.activities.HandleView.access$0(SourceFile:225)
    at com.example.activities.HandleView$1.handleMessage(SourceFile:1010)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:153)
    at android.app.ActivityThread.main(ActivityThread.java:5297)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    at dalvik.system.NativeStart.main(Native Method)

意图过滤器:

<activity
            android:name=".activities.HandleView"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateVisible|adjustResize" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.SENDTO" />

                <data android:scheme="mailto" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>
            <intent-filter android:label="@string/app_name" >
                <action android:name="android.intent.action.SEND" />

                <data android:mimeType="*/*" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:label="@string/app_name" >
                <action android:name="android.intent.action.SEND_MULTIPLE" />

                <data android:mimeType="*/*" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

0 个答案:

没有答案