我有這樣的代碼怎麼投的意圖的額外的對象[]以MyClas []
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.offers_list);
Intent callingIntent = getIntent();
if (callingIntent != null) {
Bundle extras = callingIntent.getExtras();
if (extras != null) {
Offer[] offers = (Offer[]) extras
.getSerializable(PublicMacros.OFFERS_LIST);
}
}
和我得到這個錯誤執行
02-19 01:59:52.291: E/AndroidRuntime(26440): Caused by: java.lang.ClassCastException: java.lang.Object[] cannot be cast to com.zoomer.offers.Offer[]
後,我怎樣才能正確地投?
檢查[此答案](http://stackoverflow.com/a/1115234/951894)。 – Tautvydas