In a activy I have written code that works correctly.
But now I have added a method to this activity with the following code:
private void obtenerDatosReuniones(){
try {
int j=0;
String aux = jsonReuniones.getString("nombres");
String aux2 = null;
aux2 = aux.replace("[", "");
aux2= aux2.replace("]", "");
String [] campos = aux2.split(",");
while(j<campos.length){
nombres_reuniones.add(campos[j]);
}
the type of nombres_reunones is ArrayList
When I run the application appears out the following error on line nombres_reuniones.add (campos [j]):
What am I doing wrong?
Thanks!