dimkonomis / newssync Goto Github PK
View Code? Open in Web Editor NEWSample application with MVVM pattern using RxJava and Architecture Components
License: Apache License 2.0
Sample application with MVVM pattern using RxJava and Architecture Components
License: Apache License 2.0
I built and launched the project for the first time, the second time I launch the app I get to type the bottom sheet input but after I hit the submit button it crachs.
Full logcat:
2019-07-31 13:02:11.445 11822-11822/? I/com.dk.newssyn: Late-enabling -Xcheck:jni
2019-07-31 13:02:11.970 11822-11853/? I/stetho: Listening on @stetho_com.dk.newssync_devtools_remote
2019-07-31 13:02:12.104 11822-11822/? W/com.dk.newssyn: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
2019-07-31 13:02:12.105 11822-11822/? W/com.dk.newssyn: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
2019-07-31 13:02:12.198 11822-11822/? I/FloatingActionButton: Setting a custom background is not supported.
2019-07-31 13:02:12.343 11822-11822/? D/OpenGLRenderer: Skia GL Pipeline
2019-07-31 13:02:12.365 11822-11822/? E/ExtensionsKt$defaultErrorHandler: androidx.room.EmptyResultSetException: Query returned empty result set: SELECT * FROM entries WHERE id =?
at com.dk.newssync.data.source.local.LocalDao_Impl$8.call(LocalDao_Impl.java:413)
at com.dk.newssync.data.source.local.LocalDao_Impl$8.call(LocalDao_Impl.java:395)
at io.reactivex.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:44)
at io.reactivex.Single.subscribe(Single.java:3575)
at io.reactivex.internal.operators.single.SingleFlatMap$SingleFlatMapCallback.onSuccess(SingleFlatMap.java:84)
at io.reactivex.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:56)
at io.reactivex.Single.subscribe(Single.java:3575)
at io.reactivex.internal.operators.single.SingleFlatMap.subscribeActual(SingleFlatMap.java:36)
at io.reactivex.Single.subscribe(Single.java:3575)
at io.reactivex.internal.operators.single.SingleToFlowable.subscribeActual(SingleToFlowable.java:37)
at io.reactivex.Flowable.subscribe(Flowable.java:14805)
at io.reactivex.Flowable.subscribe(Flowable.java:14752)
at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.run(FlowableSubscribeOn.java:82)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
2019-07-31 13:02:12.394 11822-11861/? I/Adreno: QUALCOMM build : 984b9a6, Ibe1bf21abc
Build Date : 06/04/18
OpenGL ES Shader Compiler Version: EV031.24.00.00
Local Branch : googldrp
Remote Branch :
Remote Branch :
Reconstruct Branch :
2019-07-31 13:02:12.395 11822-11861/? I/Adreno: Build Config : S L 4.0.10 AArch64
2019-07-31 13:02:12.398 11822-11861/? I/Adreno: PFP: 0x005ff110, ME: 0x005ff066
2019-07-31 13:02:12.402 11822-11861/? I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2019-07-31 13:02:12.402 11822-11861/? I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
2019-07-31 13:02:12.403 11822-11861/? I/OpenGLRenderer: Initialized EGL, version 1.4
2019-07-31 13:02:12.403 11822-11861/? D/OpenGLRenderer: Swap behavior 1
2019-07-31 13:02:12.463 11822-11822/? W/com.dk.newssyn: Accessing hidden method Landroid/graphics/FontFamily;-><init>()V (light greylist, reflection)
2019-07-31 13:02:12.467 11822-11822/? E/TypefaceCompatApi21Impl: java.lang.NoSuchMethodException
java.lang.NoSuchMethodException: addFontWeightStyle [class java.lang.String, int, boolean]
at java.lang.Class.getMethod(Class.java:2068)
at java.lang.Class.getMethod(Class.java:1690)
at androidx.core.graphics.TypefaceCompatApi21Impl.<clinit>(TypefaceCompatApi21Impl.java:74)
at androidx.core.graphics.TypefaceCompat.<clinit>(TypefaceCompat.java:47)
at androidx.core.graphics.TypefaceCompat.findFromCache(TypefaceCompat.java:76)
at androidx.core.content.res.ResourcesCompat.loadFont(ResourcesCompat.java:393)
at androidx.core.content.res.ResourcesCompat.loadFont(ResourcesCompat.java:361)
at androidx.core.content.res.ResourcesCompat.getFont(ResourcesCompat.java:339)
at androidx.appcompat.widget.TintTypedArray.getFont(TintTypedArray.java:119)
at androidx.appcompat.widget.AppCompatTextHelper.updateTypefaceAndStyle(AppCompatTextHelper.java:358)
at androidx.appcompat.widget.AppCompatTextHelper.loadFromAttributes(AppCompatTextHelper.java:200)
at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:103)
at androidx.appcompat.view.menu.ActionMenuItemView.<init>(ActionMenuItemView.java:72)
at androidx.appcompat.view.menu.ActionMenuItemView.<init>(ActionMenuItemView.java:68)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:647)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at androidx.appcompat.view.menu.BaseMenuPresenter.createItemView(BaseMenuPresenter.java:167)
at androidx.appcompat.view.menu.BaseMenuPresenter.getItemView(BaseMenuPresenter.java:186)
at androidx.appcompat.widget.ActionMenuPresenter.getItemView(ActionMenuPresenter.java:198)
at androidx.appcompat.widget.ActionMenuPresenter.flagActionItems(ActionMenuPresenter.java:478)
at androidx.appcompat.view.menu.MenuBuilder.flagActionItems(MenuBuilder.java:1182)
at androidx.appcompat.view.menu.BaseMenuPresenter.updateMenuView(BaseMenuPresenter.java:96)
at androidx.appcompat.widget.ActionMenuPresenter.updateMenuView(ActionMenuPresenter.java:231)
at androidx.appcompat.view.menu.MenuBuilder.dispatchPresenterUpdate(MenuBuilder.java:298)
at androidx.appcompat.view.menu.MenuBuilder.onItemsChanged(MenuBuilder.java:1069)
at androidx.appcompat.view.menu.MenuBuilder.startDispatchingItemsChanged(MenuBuilder.java:1096)
at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:461)
at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:56)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
2019-07-31 13:02:12.467 11822-11822/? W/com.dk.newssyn: Accessing hidden method Landroid/graphics/FontFamily;->addFontFromAssetManager(Landroid/content/res/AssetManager;Ljava/lang/String;IZIII[Landroid/graphics/fonts/FontVariationAxis;)Z (light greylist, reflection)
2019-07-31 13:02:12.467 11822-11822/? W/com.dk.newssyn: Accessing hidden method Landroid/graphics/FontFamily;->addFontFromBuffer(Ljava/nio/ByteBuffer;I[Landroid/graphics/fonts/FontVariationAxis;II)Z (light greylist, reflection)
2019-07-31 13:02:12.467 11822-11822/? W/com.dk.newssyn: Accessing hidden method Landroid/graphics/FontFamily;->freeze()Z (light greylist, reflection)
2019-07-31 13:02:12.467 11822-11822/? W/com.dk.newssyn: Accessing hidden method Landroid/graphics/FontFamily;->abortCreation()V (light greylist, reflection)
2019-07-31 13:02:12.467 11822-11822/? W/com.dk.newssyn: Accessing hidden method Landroid/graphics/Typeface;->createFromFamiliesWithDefault([Landroid/graphics/FontFamily;Ljava/lang/String;II)Landroid/graphics/Typeface; (light greylist, reflection)
2019-07-31 13:02:23.536 11822-11822/com.dk.newssync D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2019-07-31 13:02:23.539 11822-11822/com.dk.newssync W/com.dk.newssyn: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (light greylist, reflection)
2019-07-31 13:02:23.539 11822-11822/com.dk.newssync W/com.dk.newssyn: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (light greylist, reflection)
2019-07-31 13:02:23.539 11822-11822/com.dk.newssync W/com.dk.newssyn: Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (light greylist, reflection)
2019-07-31 13:02:23.593 11822-11822/com.dk.newssync W/com.dk.newssyn: Accessing hidden field Lsun/misc/Unsafe;->theUnsafe:Lsun/misc/Unsafe; (light greylist, reflection)
2019-07-31 13:02:23.666 11822-11855/com.dk.newssync D/OkHttp: --> GET https://newsapi.org/v2/everything?sortBy=popularity&language=en&q=a&from=2019-07-31T07%3A02%3A23
2019-07-31 13:02:23.666 11822-11855/com.dk.newssync D/OkHttp: X-Api-Key: d87012f76661488e9eb9ac94536a6459
2019-07-31 13:02:23.666 11822-11855/com.dk.newssync D/OkHttp: --> END GET
2019-07-31 13:02:23.864 11822-11855/com.dk.newssync W/com.dk.newssyn: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (light greylist, reflection)
2019-07-31 13:02:24.498 11822-11855/com.dk.newssync W/com.dk.newssyn: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (light greylist, reflection)
2019-07-31 13:02:24.672 11822-11855/com.dk.newssync D/OkHttp: <-- 200 OK https://newsapi.org/v2/everything?sortBy=popularity&language=en&q=a&from=2019-07-31T07%3A02%3A23 (1005ms)
2019-07-31 13:02:24.672 11822-11855/com.dk.newssync D/OkHttp: Cache-Control: no-cache
2019-07-31 13:02:24.672 11822-11855/com.dk.newssync D/OkHttp: Pragma: no-cache
2019-07-31 13:02:24.672 11822-11855/com.dk.newssync D/OkHttp: Content-Length: 46
2019-07-31 13:02:24.672 11822-11855/com.dk.newssync D/OkHttp: Content-Type: application/json; charset=utf-8
2019-07-31 13:02:24.672 11822-11855/com.dk.newssync D/OkHttp: Expires: -1
2019-07-31 13:02:24.672 11822-11855/com.dk.newssync D/OkHttp: X-Cached-Result: false
2019-07-31 13:02:24.672 11822-11855/com.dk.newssync D/OkHttp: Access-Control-Allow-Origin: *
2019-07-31 13:02:24.672 11822-11855/com.dk.newssync D/OkHttp: Access-Control-Allow-Methods: GET
2019-07-31 13:02:24.673 11822-11855/com.dk.newssync D/OkHttp: Access-Control-Allow-Headers: x-api-key, authorization
2019-07-31 13:02:24.673 11822-11855/com.dk.newssync D/OkHttp: Date: Wed, 31 Jul 2019 12:02:16 GMT
2019-07-31 13:02:24.675 11822-11855/com.dk.newssync D/OkHttp: {"status":"ok","totalResults":0,"articles":[]}
2019-07-31 13:02:24.675 11822-11855/com.dk.newssync D/OkHttp: <-- END HTTP (46-byte body)
2019-07-31 13:02:40.420 11822-11851/com.dk.newssync I/WM-WorkerWrapper: Worker result SUCCESS for Work [ id=23331804-7f80-4a81-9d40-32337c2aa071, tags={ com.dk.newssync.presentation.sync.SyncWorker } ]
2019-07-31 13:02:40.488 11822-11822/com.dk.newssync D/AndroidRuntime: Shutting down VM
--------- beginning of crash
2019-07-31 13:02:40.492 11822-11822/com.dk.newssync E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.dk.newssync, PID: 11822
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{599bdbe u0 com.dk.newssync/.presentation.sync.SyncService}
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1745)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
StoriesRepositoryImpl -> searchStories -> localStories
Steps to reproduce -
Move app to background -> Move app to foreground
DB operation will be executed again. Similarly, network operation will be executed once again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.