imperiumlabs / GeoFirestore-Android

GeoFirestore for Android - Realtime location queries with Firestore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It is not possible to register the location in the database

morcelicaio opened this issue · comments

The cod for register locate:

   CollectionReference collectionUsers = FirebaseFirestore.getInstance().collection("users");
    GeoFirestore geoFirestore = new GeoFirestore(collectionUsers);

    geoFirestore.setLocation("que8B9fxxjcvbC81h32VRjeBSUW2", new GeoPoint(37.7853889, -122.4056973), new GeoFirestore.CompletionListener() {
        @Override
        public void onComplete(Exception exception) {
            if (exception == null) {
                System.out.println("Location saved!");
            }
        }
    });

When I try to register, I get the following error message:
erro

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/br.edu.ifsp.scl.googlefirebase-1/split_lib_dependencies_apk.apk:classes2.dex)

What to do in this case?

This is the same problem of an issue 14

What version of the library are you using? Try the v1.4.0, currently the stable release.

Any update on this. I am facing the same problem.
Seems this issue is not there when using Firestore version 17.1.0 or lower

Any update on this. I am facing the same problem.
Seems this issue is not there when using Firestore version 17.1.0 or lower

What version of the library are you using? Check issue #13 because I think it's the same

@Rekodr , I solved my problem using this version:
implementation 'com.github.imperiumlabs:GeoFirestore-Android:v1.2.1'

Use this version or lastest.

Close because it's duplicate of issue #13 and can be solved using a newer version of the library (v1.2.1+)