Android pass a 2d int array from one activity to another ERROR
- by user2189001
ACTIVITY 1:
Bundle bundle = new Bundle();
bundle.putSerializable("CustomLevelData", LevelCreator.LCLevelData);
Intent i = new Intent(LevelCreatorPopout.this, GameView.class);
i.putExtras(bundle);
startActivity(i);
ACTIVITY 2:
LevelData=(int[][]) extras.getSerializable("CustomLevelData");
ERROR:
E/AndroidRuntime(16220): FATAL EXCEPTION: main
E/AndroidRuntime(16220): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.powerpoint45.maze/com.powerpoint45.maze.GameView}: java.lang.ClassCastException: java.lang.Object[] cannot be cast to int[][]
I have searched but found nothing on 2d INT array passing