I'm having a problem with Android when passing a 2d array to another activity. I have no problems sending it through a extra as a serializable. But when receiving it, i get the following error:
E/AndroidRuntime(7396): Caused by: java.lang.ClassCastException: java.lang.Object[] cannot be cast to java.lang.String[][]
I'm using the following code:
public void getMatriz(){
Bundle extras = getIntent().getExtras();
if(extras!=null){
String[][] matriz = (String[][]) extras.getSerializable("matriz");
}
}
Can someone help me solve this problem? Thanks in advance.