Skip to content
This repository has been archived by the owner on Aug 9, 2020. It is now read-only.

ReactiveCache is crashing when used in project with new version of Dagger2 #23

Closed
AlexTrotsenko opened this issue Jul 9, 2018 · 3 comments

Comments

@AlexTrotsenko
Copy link
Contributor

I got following exception/crash when updating dagger2 to the new version.

It might be cause by this issue. And looks very similar to issue from another project

      AndroidRuntime  E  FATAL EXCEPTION: main
                         E  Process: com.spotme.android, PID: 4817
                         E  java.lang.NoSuchMethodError: No static method injectMembers(Ldagger/MembersInjector;Ljava/lang/Object;)Ljava/lang/Object; in class Ldagger/internal/Me
                            mbersInjectors; or its super classes (declaration of 'dagger.internal.MembersInjectors' appears in base.apk!classes29.dex)
                         E      at io.rx_cache2.internal.cache.EvictRecord_Factory.get(EvictRecord_Factory.java:36)
                         E      at io.rx_cache2.internal.cache.EvictRecord_Factory.get(EvictRecord_Factory.java:11)
                         E      at io.rx_cache2.internal.cache.TwoLayersCache_Factory.get(TwoLayersCache_Factory.java:33)
                         E      at io.rx_cache2.internal.cache.TwoLayersCache_Factory.get(TwoLayersCache_Factory.java:7)
                         E      at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
                         E      at io.rx_cache2.internal.ProcessorProvidersBehaviour_Factory.get(ProcessorProvidersBehaviour_Factory.java:48)
                         E      at io.rx_cache2.internal.ProcessorProvidersBehaviour_Factory.get(ProcessorProvidersBehaviour_Factory.java:11)
                         E      at io.rx_cache2.internal.RxCacheModule_ProvideProcessorProvidersFactory.get(RxCacheModule_ProvideProcessorProvidersFactory.java:30)
                         E      at io.rx_cache2.internal.RxCacheModule_ProvideProcessorProvidersFactory.get(RxCacheModule_ProvideProcessorProvidersFactory.java:8)
                         E      at io.rx_cache2.internal.DaggerRxCacheComponent.providers(DaggerRxCacheComponent.java:202)
                         E      at io.reactivecache2.ReactiveCache.<init>(ReactiveCache.java:39)
                         E      at io.reactivecache2.ReactiveCache.<init>(ReactiveCache.java:30)
                         E      at io.reactivecache2.ReactiveCache$Builder.using(ReactiveCache.java:154)

@AlexTrotsenko
Copy link
Contributor Author

@VictorAlbertos looks like changes in https://github.com/VictorAlbertos/RxCache is needed otherwise lib is not usable in newer projects.

Looks like shading is mandatory in the libs. And here is an example.

Do you think you will be able to update the lib with needed changes or ?

@AlexTrotsenko
Copy link
Contributor Author

AlexTrotsenko commented Jul 9, 2018

Just to note: after updating to the latest version, which has "bump libs version" commit - it starts to work. But anyway looks like shading is needed as otherwise the issue could come again in the future. (also I am not sure how it will affects projects with lower version of the dagger)

@VictorAlbertos
Copy link
Owner

Feel free to open a PR to improve it 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants