问题
Getting Cannot resolve symbol for import java.time.Duration in PeriodicWorkRequest class.
Java: 8 JDK: 1.8.0_191 implementation 'android.arch.work:work-runtime:1.0.0-alpha10'
回答1:
Make sure that compileSdkVersion
is set to 26 or higher because java.time.Duration
is available only on API 26+. This won't affect the ability to run your app on devices with a lower API level.
来源:https://stackoverflow.com/questions/52996714/unable-to-import-java-time-duration-in-periodicworkrequest-class-workmanager