I have also added gradle-Retrolabda to my project. Here is a full build.gradle file: http://pastebin.com/9akA4V0d
It works well with pure Java projects. Maybe I have to do some special things to integrate it with Android project? Now it is only in dependency list as: "compile 'net.sourceforge.streamsupport:streamsupport:1.1.3'"
Though, I can't use your library and have no point what caused an error. Thank you for any help.
UPD: I'm going to create a sample empty project to find out whether the error is in my project or in the library. I'll post a link to github repo in order to allow you to launch and test it too.
Actually, streamsupport hasn't been intended to support Android from the inception.
This is because the implementation is highly dependent on the presence of some non-official API that may be missing on a non-Sun/Oracle Java runtime.
It didn't occur to me until lately that the library may be of special interest to Android users. The upcoming 1.1.4 release is purpose-built for usage on Android.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "Bug reports" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I am trying to use this great library in my android project, but I always get this exception while streaming any list:
java.lang.ExceptionInInitializerError
Caused by: java.lang.ExceptionInInitializerError
Caused by: java.lang.ExceptionInInitializerError
Caused by: java.lang.Error: java.lang.NoSuchFieldException: theUnsafe
Caused by: java.lang.NoSuchFieldException: theUnsafe
Here is a full stacktrace: http://pastebin.com/raw.php?i=SetVUCHU
Code that caused fatal exception: http://pastebin.com/FdHgJmts
I have also added gradle-Retrolabda to my project. Here is a full build.gradle file: http://pastebin.com/9akA4V0d
It works well with pure Java projects. Maybe I have to do some special things to integrate it with Android project? Now it is only in dependency list as: "compile 'net.sourceforge.streamsupport:streamsupport:1.1.3'"
Though, I can't use your library and have no point what caused an error. Thank you for any help.
UPD: I'm going to create a sample empty project to find out whether the error is in my project or in the library. I'll post a link to github repo in order to allow you to launch and test it too.
UPD2: An exception is confirmed on newly created empty project. Check it out: https://github.com/NoSuchFieldException/streamsupport-test
Last edit: Anonymous 2015-02-09
View and moderate all "Bug reports" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Do this:
System.setProperty("java8.util.Spliterators.assume.oracle.collections.impl", "false");
before java8.util.Spliterators is loaded (better: before anything from streamsupport is used at all).
View and moderate all "Bug reports" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks. Everything is working now. Hope that 1.1.4 will fix this regrettable issue.
Actually, streamsupport hasn't been intended to support Android from the inception.
This is because the implementation is highly dependent on the presence of some non-official API that may be missing on a non-Sun/Oracle Java runtime.
It didn't occur to me until lately that the library may be of special interest to Android users. The upcoming 1.1.4 release is purpose-built for usage on Android.
Please note that, beginning with release 1.3.1, the above information about the necessity of setting the
"java8.util.Spliterators.assume.oracle.collections.impl"
property on Android to "false" is obsolete now.
streamsupport-1.3.1 (and higher) can be used on Android without setting any special property.