imperiumlabs / GeoFirestore-Android

GeoFirestore for Android - Realtime location queries with Firestore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatibility with firestore 18.0.0

mirdones opened this issue · comments

I updated firestore to version 18.0.0.

Now I am getting the following error:

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'
at org.imperiumlabs.geofirestore.GeoFirestore.setLocation(GeoFirestore.java:128)

Also have issues with version 18.0.0

In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: com.google.android.gms:play-services-stats:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.0.1.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.firebase:firebase-firestore@18.0.0
-- Project 'app' depends onto com.google.firebase:firebase-core@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-places@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector-impl@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-common@16.0.4
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-basement@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-ads-identifier@15.0.1
-- Project 'app' depends onto com.google.firebase:firebase-auth-interop@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-places-placereport@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-iid@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-tasks@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-analytics@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-iid-interop@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-base@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-analytics-impl@16.1.1
-- Project 'app' depends onto com.google.android.gms:play-services-maps@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-stats@15.0.1
-- Project 'app' depends onto com.github.imperiumlabs:GeoFirestore-Android@v1.1.1

i hope this error will be fixed

same problem

what sloved ?

i am used version 18.0.1

this problem got resolved when I downgraded the firestore version to 17.1.2

this problem got resolved when I downgraded the firestore version to 17.1.2

That is not exactly solving the problem.

By the way, this library can work with Firestore up to 17.1.5

i tested same error with firestore version to 17.1.2 and 17.1.5

i tested same error with firestore version to 17.1.2 and 17.1.5

Share your app gradle configuration and the error you are facing.

apply plugin: 'com.android.application'

android {

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
compileSdkVersion 28
defaultConfig {
    applicationId "com.2.cvcvbb"
    minSdkVersion 19
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.github.imperiumlabs:GeoFirestore-Android:v1.1.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.h6ah4i.android.widget.verticalseekbar:verticalseekbar:1.0.0'
implementation 'com.firebase:geofire-android:2.3.1'
implementation 'com.google.firebase:firebase-database:16.0.6'
implementation 'com.google.firebase:firebase-firestore:16.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'

and error

///'
Now I am getting the following error:

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'
at org.imperiumlabs.geofirestore.GeoFirestore.setLocation(GeoFirestore.java:128)

I still get the error when I try removing GeoFirestore location using removeLocation("itemId") methos

I have this error with Firestore version 18.2.0 when using setLocation method

downgrade to 17.1.5 solved my problem.

Is there no fix for this since January? Is the library still maintained?

I think the incompatibility issue should has been resolved already.
Try v1.2.0 or v1.2.1. (Currently the build of v1.3.0 is failing so you cannot import that version from JitPack directly: #23)

I think the incompatibility issue should has been resolved already.
Try v1.2.0 or v1.2.1. (Currently the build of v1.3.0 is failing so you cannot import that version from JitPack directly: #23)

This has resolved my problem by changing the version 1.2.1 as @scm573 told

This problem is present only in older versions of the library and is caused by depending in an older version of Firestore, this issue is solved using a version newer than v1.2.1.
Follow the README.MD to import the current stable version of the library

upgrade to 19.0.0 solved my problem.