我有從一個活動通過我2D串數組另一個活動 我嘗試了一些代碼的問題......但他們表現出一些錯誤如何從一個活動傳遞兩個diamentional數組到另一個活動?
我的字符串數組是:
String[][] commuterDetails=new String[2][5];
commuterDetails=
{
{ "a", "b","c", "d","e" },
{"f", "g","h", "i","j" }
};
我嘗試了一些代碼
在第一項活動
Intent summaryIntent = new Intent(this, Second.class);
Bundle b=new Bundle();
b.putSerializable("Array", commuterDetails);
summaryIntent.putExtras(b);
startActivity(summaryIntent);
在第二活動
Bundle b = getIntent().getExtras();
String[][] list_array = (String[][])b.getSerializable("Array");
但它顯示錯誤
Caused by: java.lang.ClassCastException: [Ljava.lang.Object;
我在Android的新的,請幫我
**沒有人給我一個解決方案....誰能回答這個問題... ?? ** – SibinF 2013-02-28 11:22:24