imperiumlabs / GeoFirestore-Android

GeoFirestore for Android - Realtime location queries with Firestore
MIT License
123 stars 36 forks source link

It is not possible to register the location in the database #29

Closed morcelicaio closed 5 years ago

morcelicaio commented 5 years ago

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?

morcelicaio commented 5 years ago

This is the same problem of an issue 14

Supercaly commented 5 years ago

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

Rekodr commented 5 years ago

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

Supercaly commented 5 years ago

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

morcelicaio commented 5 years ago

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

Use this version or lastest.

Supercaly commented 5 years ago

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