Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6020485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:34:33+00:00 2026-05-23T03:34:33+00:00

As these 2 questions clearly show, the android implementation of the jdk do not

  • 0

As these 2 questions clearly show, the android implementation of the jdk do not include some of the java.util.concurrent.TimeUnit enum values, particularly DAYS.

Since I am extensively using a common library which references TimeUnit.DAYS I need the enum value to exist. I know the functionality of TimeUnit.DAYS is the same as TimeUnit.HOURS * 24 however I can’t change the implementation of the referenced library.

How would I go about overriding the android jdk implementation of this Enum so that I stop getting the NoSuchFieldError at runtime?

Thanks for the help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:34:34+00:00Added an answer on May 23, 2026 at 3:34 am

    You are not likely to find a solution. Even if you could override the built in TimeUnits class (I don’t believe you can) you would have no way to feed the new one into your library and get it to work.

    In normal java you could replace the classloader before loading the library but that would be a really bad (and difficult) solution anyway.

    If your library is open-source or if you own it, I’d recommend fixing it and rebuilding–seems pretty straight-forward. If you submit a patch and tell them why then it should automatically be included in future versions.

    If you don’t own it, you have to get the person or group who does to rebuild it (This is the reason old-school programmers hate closed source, even if you are willing to do it yourself, you are often completely blocked).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

These are some questions for any developer whose made the jump from Java to
I'm going to try to rephrase and genericize these two questions: Custom Android OS
I found these questions, but a couple of them were a little old: https://stackoverflow.com/questions/191556/should-i-pursue-asp-net-webforms-or-asp-net-mvc
Here's another one of these LinqToSQL questions where I'm sure I must have missed
Okay, these two related questions are in reference to Railscast #21 : I'm having
I've seen many questions on SO about .NET 3.5 advantages, but these are more
Requirements : I have a table of several thousand questions. Users can view these
I have two noobish questions about Flash, Actionscript, Flex etc. 1) With these technologies
In this other question , the votes clearly show that the os.path.splitext function is
I am clear with advanced use of enum in java. Many of the points

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.