-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NoSuchMethodError: java.util.List.sort(Ljava/util/Comparator;)V #555
Comments
@timmolter current RoboVM runtime doesn't support Java8 APIs like streams. Its compatible with Android 4.4 one. |
@dkimitsa Thanks for the quick answer! "Its compatible with Android 4.4 one." - What do you mean by this exactly? Does RoboVM plan to support Java8 APIs anytime soon? |
The Java API supported is that of Android 4.4 - which is, generally, Java 7 APIs. |
@timmolter
there is work in progress that brings Android10 Java runtime, which is Java8+ API #527 |
Would it be possible to have a compile time error for this? I mostly notice these issues after release since I can't test every platform each time. |
Yo can set your project source level to 6 or 7 on your build tool.
…On Sat, 13 Feb 2021 at 11:46, David ***@***.***> wrote:
Would it be possible to have a compile time error for this? I mostly
notice these issues after release since I can't test every platform each
time.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#555 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANWDPBVV6KQV7PKYW66HITS6ZKAHANCNFSM4WTHYASQ>
.
|
@obigu its a problem when third party dependency using such api |
@obigu No because some java 8 features are working fine and I heavily use them (for example lambdas for event listeners) |
I ended up changing the lib's code to Java 7 API: hashgraph/hedera-sdk-java#451 |
Please ensure you have given all the following requested information in your report.
Issue details
Getting a
NoSuchMethodError
for a Java8+ Streaming call:List.sort(Object::compareTo)
. I could update the library code toCollections.sort(list, comparator)
, but it would be very time consuming and a non-desirable approach. Is there something I'm missing here with using RoboVM?java.lang.NoSuchMethodError: java.util.List.sort(Ljava/util/Comparator;)V
at com.hedera.hashgraph.sdk.Network.getNodeAccountIdsForExecute(Network.java:89)
Hedera project code line reference here:
https://github.com/hashgraph/hedera-sdk-java/blob/c6dc4a0e9fb3f28297abfbefa17f2d02996f7b3d/sdk/src/main/java/com/hedera/hashgraph/sdk/Network.java#L89
Versions:
Please provide the version of RoboVM, XCode and JDK used
The text was updated successfully, but these errors were encountered: