Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

报这个是什么错误额? #37

Open
i91h1r opened this issue Jul 9, 2019 · 2 comments
Open

报这个是什么错误额? #37

i91h1r opened this issue Jul 9, 2019 · 2 comments

Comments

@i91h1r
Copy link

i91h1r commented Jul 9, 2019

ClassNotFoundException: Didn't find class "androidx.collection.LruCache" on path: DexPathList[

在model 中加上相关的缓存代码

public class HomeNewRecommendModel implements HomeNewRecommendContract.Model {
@OverRide
public Observable getHomeNewRecommendData(String baby_id) {
return HomeIndexAPI.get().getHomeNewRecommendData(baby_id).compose(new DefaultTransformer<>()).compose(
RxCache.getDefault().transformObservable("my_home/v317" + baby_id,new TypeToken(){}.getType(),
CacheStrategy.firstCache())).map(new CacheResult.MapFunc());
}
}

@XuanJiAndroid
Copy link

同样的问题,应该是库里面用了androidx的东西,但原项目内没有迁移到androidx

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/collection/LruCache

@XuanJiAndroid
Copy link

已解决,将版本修改成2.3.3即可,参考issues/32

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