question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ServiceConfigurationError in Android

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cruftexcommented, Feb 3, 2020

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.

0reactions
cruftexcommented, Aug 14, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found