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

  • Home
  • SEARCH
  • 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 8492859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:50:46+00:00 2026-06-10T22:50:46+00:00

I am running my application on emulator with Android 2.2 and API level 8.

  • 0

I am running my application on emulator with Android 2.2 and API level 8.

I have tested the following 2 lines in my code:

 long diffInDays = TimeUnit.MILLISECONDS.toDays(diffInMs); // API Level 9
 long diffInDays = TimeUnit.DAYS.convert(diffInMs,TimeUnit.MILLISECONDS); // API Level 1

I am using line above to convert time in Milliseconds to time in days but i get the following exception. Why?

09-05 06:34:43.183: W/dalvikvm(12995): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
09-05 06:34:43.222: E/AndroidRuntime(12995): FATAL EXCEPTION: main
09-05 06:34:43.222: E/AndroidRuntime(12995): java.lang.NoSuchFieldError: java.util.concurrent.TimeUnit.DAYS
09-05 06:34:43.222: E/AndroidRuntime(12995):    at org.mabna.order.businessLayer.db.BoSaleDocuments.getEntAcc002Collection(BoSaleDocuments.java:161)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at org.mabna.order.ui.ActReportAcc002.onCreate(ActReportAcc002.java:178)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at android.app.ActivityThread.access$2300(ActivityThread.java:125)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at android.os.Handler.dispatchMessage(Handler.java:99)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at android.os.Looper.loop(Looper.java:123)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at android.app.ActivityThread.main(ActivityThread.java:4627)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at java.lang.reflect.Method.invokeNative(Native Method)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at java.lang.reflect.Method.invoke(Method.java:521)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-05 06:34:43.222: E/AndroidRuntime(12995):    at dalvik.system.NativeStart.main(Native Method)
  • 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-06-10T22:50:47+00:00Added an answer on June 10, 2026 at 10:50 pm

    toDays(long duration) require API level 9.

    see http://developer.android.com/reference/java/util/concurrent/TimeUnit.html

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

Sidebar

Related Questions

While running my android application in emulator,it shows The application is not installed in
I wrote an application using the Android 2.2 SDK (API level 8). It is
We have an Android application running on Android 2.2 on the Samsung Galaxy Tab
Unable to show android application on the running emulator. Actually i am trying to
Now I am developing one android application. I am running my code in emulateor.
I'm using fragments in my Android application using the compatibility package. I have tested
I need to take screenshots of an android application running on an emulator in
I developed my application and tested it on android emulator 1.6, 2.1 & 2.2
I have opened the Android Emulator for my first set of code change. Then
In a *NIX environment, if I have a 24x7 running application, how do I

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.