ServiceConfigurationError in Android
See original GitHub issueI get this exception every other build…
java.util.ServiceConfigurationError: Couldn't read jar:file:/data/app/....-1/base.apk!/META-INF/services/org.cache2k.spi.Cache2kCoreProvider
at java.util.ServiceLoader$ServiceIterator.readClass(ServiceLoader.java:245)
at java.util.ServiceLoader$ServiceIterator.hasNext(ServiceLoader.java:202)
at org.cache2k.spi.b.a(SingleProviderResolver.java:106)
at org.cache2k.spi.b.a(SingleProviderResolver.java:82)
at org.cache2k.spi.b.b(SingleProviderResolver.java:64)
at org.cache2k.f.<clinit>(CacheManager.java:54)
at org.cache2k.c.b(Cache2kBuilder.java:160)
the first build crashes the app with that exception, the second one succeeds. I’m using r8 with the Proguard rules that are on the cache2k.org docs.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
ServiceConfigurationError - Android Developers
ServiceConfigurationError. bookmark_border. Stay organized with collections Save and categorize content based on your preferences. Dismiss
Read more >ServiceConfigurationError | Android Developers
Constructs a new error with the given detail message. Parameters. message, the detail message, or null. public ServiceConfigurationError ...
Read more >ServiceConfigurationError - Android SDK | Android Developers
Constructs a new error with the given detail message. ServiceConfigurationError(String message, Throwable cause). Constructs a new error with the given detail ...
Read more >ServiceConfigurationError - Android - API Reference Document
ServiceConfigurationError (String msg). Constructs a new instance with the specified message. ServiceConfigurationError(String msg, Throwable cause).
Read more >sdk/sources/android-25/java/util/ServiceConfigurationError.java ...
* by Oracle in the LICENSE file that accompanied this code. *. * This code is distributed in the hope that it will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Interesting, thanks for the update!
I am still automatically testing with Android 4.1 Jelly Bean (API 16). So theoretically, everything above should work.
There was trouble with Android in the past and its always class loading around the SPI mechanism. SPI is used in cache2k to have the option to ship different implementations for the same API. However, there is only a single implementation right now. Maybe I should remove or simplify that area.
Closing. We need to start working on cache2k version 2 and drop support of older Android version anyway. Its unclear whether and how we will support Android anyways in the future, since we don’t have capacity for validation tests at the moment. I opened https://github.com/cache2k/cache2k/issues/143 to further address this.