android - can't use Arrays.copyOfRange -
android - can't use Arrays.copyOfRange -
i don't seem able access arrays.copyofrange in android project in eclipse indigo 3.7.1 on ubuntu 11.10.
my jre java-6-openjdk thought included arrays.copyofrange
for example, if have code:
int[] debug = new int[5]; int[] x = arrays.copyofrange(debug,0,4);
eclipse tells me
the method copyofrange(int[], int, int)
undefined type arrays
i don't understand because android reference arrays includes method arrays.
any ideas?
the method arrays.copyofrange()
wasn't introduced until api level 9
. create sure using minimum sdk.
also, indexing incorrectly. in java if have array of size 5
indices range 0->4
change code this:
int[] debug = new int[5]; int[] x = arrays.copyofrange(debug,0,4); // utilize 4 instead of 5
android eclipse
Comments
Post a Comment