activity之间传递对象,java.lang.ClassCastException
activity之间传递对象,传参:
broadcastIntent.putExtra("myMapLocation", aMapLocation);
sendBroadcast(broadcastIntent);
接收参数:
AMapLocation amapLocation = intent.getParcelableExtra("myMapLocation");
drawLine(amapLocation);
报错:Caused by: java.lang.ClassCastException: android.location.Location cannot be cast to com.amap.api.location.AMapLocation。
Location 是AMapLocation的父类,Location实现了Parcelable接口
求解,在线等,只有这么多分了