You never initialize any of these arraylists.
Do you want to
ArrayList<ArrayList<String>> mainArray = new ArrayList<ArrayList<String>>(); // or new ArrayList<>() in java 7
and inside the inner loop:
ArrayList<String> innerArrays = new ArrayList<String>(); // or new ArrayList<>() in java 7
Also, never suppress "just for code" warnings. Only suppress them when you know exactly why they appear, and that is why you prefer to ignore them.