Open washeeeq opened 5 years ago
fun fetchFeed(rssFeedUrl: String): MutableList<Article> {
var articleList = mutableListOf<Article>()
launch(coroutineContext) {
try {
Timber.tag(this.javaClass.toString()).d("Feed will be read.")
val reader = RSSReader()
val feed = reader.load(rssFeedUrl)
Timber.tag(this.javaClass.toString()).d("Title is> ${feed.title}")
val i = 5
} catch (e: Exception) {
Timber.tag(this.javaClass.toString()).e("Error hapened. ${e.message}")
e.printStackTrace()
}
}
return articleList
}
Tried to use your lib unfortunately got an error:
E/g.allatra.vest: Maybe bug 77342775, looking for Lorg/apache/http/conn/scheme/SchemeSocketFactory; 0x12e2c808[continuous;main space (region space)] defined in /data/app/org.allatra.vesti-6Ivn8VX5g-PnsnhK81HszA==/base.apk/0x7d2fdd40d7c0 with loader: dalvik.system.PathClassLoader/0x7d2f4ce29a50[hit:continuous;main space (region space)](/data/app/org.allatra.vesti-6Ivn8VX5g-PnsnhK81HszA==/base.apk/0x7d2fdd40d7c0);java.lang.BootClassLoader/0x7d2fdd373c30 in interface table for Lorg/apache/http/conn/ssl/SSLSocketFactory; 0x70398ba8[image;/system/framework/x86_64/boot-framework.art;+;0x7035e000] defined in /system/framework/framework.jar!classes3.dex/0x7d2fdd489140 ifcount=2 with loader BootClassLoader iface #0: org.apache.http.conn.scheme.SocketFactory iface #1: org.apache.http.conn.scheme.LayeredSocketFactory W/g.allatra.vest: Accessing hidden method Ljava/lang/Thread;->getUncaughtExceptionPreHandler()Ljava/lang/Thread$UncaughtExceptionHandler; (greylist,core-platform-api, reflection, allowed) E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-1 Process: org.allatra.vesti, PID: 8644 java.lang.IncompatibleClassChangeError: Class 'org.apache.http.conn.ssl.SSLSocketFactory' does not implement interface 'org.apache.http.conn.scheme.SchemeSocketFactory' in call to 'java.net.Socket org.apache.http.conn.scheme.SchemeSocketFactory.createSocket(org.apache.http.params.HttpParams)' (declaration of 'org.apache.http.impl.conn.DefaultClientConnectionOperator' appears in /data/app/org.allatra.vesti-6Ivn8VX5g-PnsnhK81HszA==/base.apk) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:561) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732) at org.mcsoxford.rss.RSSReader.load(RSSReader.java:94) at org.allatra.vesti.rss.RssParser$fetchFeed$1.invokeSuspend(RssParser.kt:29) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742) I/Process: Sending signal. PID: 8644 SIG: 9 Application terminated.