Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to set data in firestore using HashMap #78

Open
monowar1993 opened this issue Mar 26, 2019 · 4 comments
Open

Error when trying to set data in firestore using HashMap #78

monowar1993 opened this issue Mar 26, 2019 · 4 comments

Comments

@monowar1993
Copy link

FATAL EXCEPTION: main
Process: com.pocktor.android.dev, PID: 29855
java.lang.NoSuchMethodError: No virtual method set(Ljava/util/Map;Lcom/google/firebase/firestore/SetOptions;)Lcom/google/android/gms/tasks/Task; in class Lcom/google/firebase/firestore/DocumentReference; or its super classes (declaration of 'com.google.firebase.firestore.DocumentReference' appears in /data/app/com.pocktor.android.dev-O96hCBhCneUJXu3Wl598Rg==/split_lib_dependencies_apk.apk!classes2.dex)
at durdinapps.rxfirebase2.RxFirestore$11.subscribe(RxFirestore.java:361)
at io.reactivex.internal.operators.completable.CompletableCreate.subscribeActual(CompletableCreate.java:39)
at io.reactivex.Completable.subscribe(Completable.java:2302)
at io.reactivex.internal.operators.maybe.MaybeFlatMapCompletable$FlatMapCompletableObserver.onSuccess(MaybeFlatMapCompletable.java:91)
at io.reactivex.internal.operators.maybe.MaybePeek$MaybePeekObserver.onSuccess(MaybePeek.java:122)
at io.reactivex.internal.operators.maybe.MaybeCreate$Emitter.onSuccess(MaybeCreate.java:73)
at durdinapps.rxfirebase2.RxHandler.onSuccess(RxHandler.java:36)
at com.google.android.gms.tasks.zzn.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Please update the firestore gradle version. I think that will solve this issue.

@monowar1993
Copy link
Author

@FrangSierra any update here??

@amatkivskiy
Copy link

I am also waiting for this to be fixed 👍

@monowar1993
Copy link
Author

I solved the issue by cloning the project and add dependency as module project in my app. Also updated Firebase libraries to latest version. This will solve the issue.

@kormateusz
Copy link

You can create your own method:

fun setDocument(documentReference: DocumentReference, setFieldsMap: Map<*, *>, setOptions: SetOptions): Completable { return Completable.create { emitter -> RxCompletableHandler.assignOnTask<Void>(emitter, documentReference.set(setFieldsMap, setOptions)) } }

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

No branches or pull requests

3 participants