Gopi Krishna Gopi Krishna - 1 year ago 66
Java Question

Is Android N Stream API backported to lower versions?

Latest version of Android N has stream package but when i'm trying to use it is saying min Sdk version which i should use is 24 (N) and my min SDK is 16.

I enabled JackOptions with which Lambda expressions , Method References are working fine ( even for versions less than N minsdk) but still has problem is only with Stream package . The link below says lambda, method references are available to 23 n lower also but no clarity on Stream package.

So i want to understand that Steam package i cannot use in my project ( minsdk 16) ? Or am I missing something .

All sdk components are updated .
compileSdkVersion 24
buildToolsVersion "24.0.2"
minSdkVersion 16
targetSdkVersion 24 (23 doesn't matter )

Please suggest me what i should do . Also i saw streamsupport which is working fine but i don't want to add a new dependency.

Answer Source

Is Android N Stream API backported to lower versions?

No, it is not, at least in terms of literally using java and javax packages, such as No classes get backported to their original Java packages, as otherwise there are namespace collisions on newer devices.

To date, Google has not released some sort of workalike classes for, etc., as a library, where those classes happen to use a separate Java package.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download