yusufyilmazfr / podcast4j

podcast4j is an open source full implemented Java client for podcastindex.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crashes on Android as this depends on java.net.HttpClient that Android has removed

ashishb opened this issue · comments

java.lang.NoClassDefFoundError: Failed resolution of: Ljava/net/http/HttpClient;
E      at com.github.yusufyilmazfr.podcast4j.service.category.Podcast4jCategoryServiceImpl.<init>(Podcast4jCategoryServiceImpl.java:24)
E      at com.github.yusufyilmazfr.podcast4j.factory.Podcast4jServiceFactory.with(Podcast4jServiceFactory.java:43)
E      at net.ashishb.androidmusicplayer.network.podcastindex.PodcastIndexService.<init>(PodcastIndexService.java:38)
E      at net.ashishb.androidmusicplayer.network.podcastindex.PodcastIndexService.getInstance(PodcastIndexService.java:26)
E      at net.ashishb.androidmusicplayer.controller.transformers.PodcastSearcher.lambda$listFilter$1(PodcastSearcher.java:69)
E      at net.ashishb.androidmusicplayer.controller.transformers.PodcastSearcher$$ExternalSyntheticLambda0.run(Unknown Source:4)
E      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463)
E      at java.util.concurrent.FutureTask.run(FutureTask.java:264)
E      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
E      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
E      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)

Hi @ashishb, nice to see someone who is trying to use podcast4j.

Actually, I've no Android development experience so i couldn't think about Android support for HttpClient that is under the java.net.http.* package. I guess i've to change HttpClient dependency for Android compatible libraries.

Exactly. May be you can replace it with a HttpProvider that I can implement for Android?