I am developing an Android application that, among other things, uses the toLongArray method from java.BitSet. As you can see here , this method was introduced in the Android API level 19, Android 4.4. Lint in Eclipse correctly warns me about this because my minSdkVersion is 10, but I can configure it so that it doesn't complain.
With this, I could create a project and run it: in Android 5.0, it works in Android 2.3 (API level 10), but this is not surprising in Android 4.0.3, 4.1.2, 4.2 (which are below API level 19), it works like a charm, although it should not work. The same thing happens even if I set min / target sdk to 15 (Android 4.0.3).
The same thing happens for Object.hashCode, and I cannot understand why it works.
source
share