I use Android studio for my Android code base and my code uses ZipInputStream.java
, which is provided by both Android SDK and JDK. It doesn't matter which version of SDK or JDK it is.
Strange thing is when I run my apk on Android-M and lower devices and emulators, the version of the above mentioned class comes from SDK but on Android N emulator, while using the same apk, ZipInputStream.java
comes from the JDK.
How can I force Android N to use the classes from SDK by default and not JDK?
Please note that I have tried this by building the apk by using api 23 and 24 as both target and compile sdk versions, 23.x and 24.x versions for both build tools and support-v4. I even tried by using both JDK 7 and 8. It seems there's something with the Android N OS in how it chooses JDK classes over SDK classes that I might be missing. Help will be appreciated. Thanks in advance.