I have a subclass of an ArrayAdapter declared like this
public class ShoppingCartAdapter extends ArrayAdapter<ShoppingCart> {
and everything has been working fine. Now suddenly(?) I have problems with this on my Nexus S running 2.3.6 or an emulator with 2.2 throwing
12-19 14:33:36.136: ERROR/AndroidRuntime(27326): FATAL EXCEPTION: main
java.lang.NoSuchMethodError: com.somewhere.mobile.fragment.ShoppingCartListFragment$ShoppingCartAdapter.addAll
however it still works just fine on e.g. my Xoom with 3.2.
I am not overriding the super addAll methods and since it works on some device I am not sure where to look next. Any hints?
UPDATE:
I replaced adapter.addAll(newCarts) with
for (ShoppingCart cart : newCarts) {
adapter.add(cart);
}
and that works. I assume it has something to do with generics but have been unable to nail it down yet.
has been added starting from API 11 (Android 3.0). Here the doc.