我遇到了这个错误
java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
我的代码:
String[] web = new String[jsonArray.length()-1];
int[] imageId = new int[]{jsonArray.length()-1};
for (int i = 0; i < jsonArray.length(); ++i) {
jo_inside = jsonArray.getJSONObject(i);
imageId[i] = R.drawable.a1;
web[i] = jo_inside.getString("level");
}