ThreeTen Backport仅在某些设备上导致运行时

时间:2019-02-28 20:05:52

标签: android threetenbp

任何人都对这种痕迹感到熟悉吗?它仅在少数设备上发生。 ThreeTenBP是依赖项中的依赖项。

10:16:33 E AndroidRuntime : java.util.ServiceConfigurationError: org.threeten.bp.zone.ZoneRulesProvider: Provider org.threeten.bp.zone.TzdbZoneRulesProvider not found
10:16:33 E AndroidRuntime : at java.util.ServiceLoader.fail(ServiceLoader.java:233)
10:16:33 E AndroidRuntime : at java.util.ServiceLoader.access$100(ServiceLoader.java:183)
10:16:33 E AndroidRuntime : at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:373)
10:16:33 E AndroidRuntime : at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:416)
10:16:33 E AndroidRuntime : at java.util.ServiceLoader$1.next(ServiceLoader.java:494)
10:16:33 E AndroidRuntime : at org.threeten.bp.zone.ZoneRulesInitializer$ServiceLoaderZoneRulesInitializer.initializeProviders(ZoneRulesInitializer.java:123)
10:16:33 E AndroidRuntime : at org.threeten.bp.zone.ZoneRulesInitializer.initialize(ZoneRulesInitializer.java:89)
10:16:33 E AndroidRuntime : at org.threeten.bp.zone.ZoneRulesProvider.<clinit>(ZoneRulesProvider.java:82)
10:16:33 E AndroidRuntime : at org.threeten.bp.zone.ZoneRulesProvider.getRules(Unknown Source:0)
10:16:33 E AndroidRuntime : at org.threeten.bp.ZoneRegion.ofId(ZoneRegion.java:143)
10:16:33 E AndroidRuntime : at org.threeten.bp.ZoneId.of(ZoneId.java:358)
10:16:33 E AndroidRuntime : at org.threeten.bp.ZoneId.of(ZoneId.java:286)
10:16:33 E AndroidRuntime : at org.threeten.bp.ZoneId.systemDefault(ZoneId.java:245)
10:16:33 E AndroidRuntime : at org.threeten.bp.Clock.systemDefaultZone(Clock.java:137)
10:16:33 E AndroidRuntime : at org.threeten.bp.LocalDate.now(LocalDate.java:165)

1 个答案:

答案 0 :(得分:1)

添加了保护规则:

-keep class org.threeten.bp.zone.*

似乎已将其修复!