question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android API below 24 Throws java.lang.NoSuchMethodError

See original GitHub issue

Hello guys. First I want to thank you for this great library!

I’m building a mobile app with heavy cron manipulation and this library has helped a ton, doing all the parsing automatically. The library works great on android 6+ (using release 6.0.5 since I need to support Android versions 4.2+)

However, on android 4 and 5, the CronParser throws an exception in the constructor when calling buildPossibleExpressions(cronDefinition); due to the fact that in Android API below 24 the method List.sort() does not exist. Is there any version fo the library that works with API below 24, or I should download the library and manually make some changes to get it up and running on older android versions? Thank you!

P.S.: If you need a stack trace let me know, but the crash is really simple. The constructor crashes when calling sortedExpression.sort(CronParserField.createFieldTypeComparator()); because the sort method was added after android API 24.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tylergetscommented, May 8, 2018

I submitted PR #326 to get started on fixing this issue.

1reaction
jmrozaneccommented, Jan 15, 2018

@L4grange Thanks! If you send us a PR, we will be glad to perform a release with it! Thank you for the update! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix this java.lang.NoSuchMethodError?
Thread.run(Thread.java:841) Caused by: java.lang.NoSuchMethodError: com.google.api.client.googleapis.services.json.
Read more >
Java.Lang.NoSuchMethodError: 'No static method · Issue #5728
Struggling with a problem trying to resolve a method that I know EXISTS in my Android Binding Library, the static method is ...
Read more >
NoSuchMethodError - Android Developers
Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has...
Read more >
RenderNodeApi23.discardDisplayList throws ... - Issue Tracker
Example failure - Instrumentation run failed due to 'java.lang.NoSuchMethodError' ... It was only changed to discardDisplayList in API 24 .
Read more >
Binary compatibility issue with Ktor 1.6.5 (affecting JDK 1.8 ...
KTOR-3384 JDK8 throw an exception: java.lang.NoSuchMethodError: ... toByteArray() throws NoSuchMethodError after update to 1.6.6 version on Android client.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found