利用广播进程间通信,传递枚举类型的参数,报错。
尝试解决的方法是在接收广播的地方,重新加载了classloader。
Bundle bundle = intent.getExtras();
bundle.setClassLoader(BFWCNetWorkType.class.getClassLoader());
networkType =(BFWCNetWorkType)bundle.getSerializable("status");
BFWCNetWorkUtil.setCurrentNetworkType(networkType);
程序正在运行测试,后续会持续记录更新。