Class not found "Java.time.Duration"

Viewed 64

I am getting following exception On Fire OS 6 and it works on Fire OS 7.2(Android 9) and Java library for OAuth 1.0a and OAuth 2.0 support Android 4.0 and higher. Why it is not working on Fire OS 6 which has Android 7.1.

And if i check java/time/Duration class it is added in API level 26. Does it mean it will works Android 8.0 and above.

How do i add support for older version?

java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Duration;
        at com.google.auth.oauth2.OAuth2Credentials.<clinit>(OAuth2Credentials.java:70)
        at com.google.auth.oauth2.UserCredentials.newBuilder(UserCredentials.java:371)
    

thanks

0 Answers
Related