Android runs a class library that is (largely) compatible with Java 6. Classes and methods introduced in Java 7 are not available at the present time.
Java 7 method not found in Android environment - BitSet [duplicate]
-
03-06-2022 - |
题
I am a developer new to Android en Eclipse (not to Java), using the latest ADT and Java SE 7u25. I am using a BitSet while working in the Android environment. In Java 7 there is the toByteArray method (toByteArray - Java 7 doc). However the method is not found (build error). Referring to the Android reference (BitSet - Android doc), we can note that the method is not included. This seems the same for other methods of BitSet new in Java 7.
The question: is it possible to use this new method in the Android environment?
Thank you in advance
解决方案
不隶属于 StackOverflow