java.lang.RuntimeException: Internal error in Firestore (0.6.6-dev) after updating Firestore version

后端 未结 3 1687
别那么骄傲
别那么骄傲 2021-01-24 10:38

I am getting below error after updating from firestore:17.0.1 to firestore:17.0.2

java.lang.RuntimeException: Internal error in Firest         


        
相关标签:
3条回答
  • 2021-01-24 11:01

    I had this same issue and none of the solutions worked for me when I tried them individually. After trying out various combinations that were already posted and trying out downgrading and upgrading dependencies, finally the solution below worked for me:

    First, ensure you have these versions in your project level build.gradle file:

    classpath 'com.android.tools.build:gradle:3.3.2'
    classpath 'com.google.gms:google-services:4.2.0'
    

    Secondly, ensure you have these versions in your app level build.gradle file:

    implementation 'com.google.firebase:firebase-core:16.0.8'
    implementation 'com.google.firebase:firebase-auth:16.2.1'
    implementation 'com.google.firebase:firebase-firestore:17.0.1'
    

    After this, if you have build and/or sync issues, replace

    implementation 'com.google.firebase:firebase-firestore:17.0.1'
    

    with the below code having the exclusions that prevents your build to finish successfully: (in my case these 3 exclusions were needed)

    implementation('com.google.firebase:firebase-firestore:17.0.1') {
        exclude group: 'com.squareup.okio'
        exclude group: 'com.google.guava'
        exclude group: 'com.google.code.gson'
    }
    

    Also, ensure you have this at the end of your app level build.gradle file:

    apply plugin: 'com.google.gms.google-services'
    

    Furthermore, you need to have this in your proguard-rules.pro file:

    -keepclassmembers enum * {
        public static **[] values();
        public static ** valueOf(java.lang.String);
    }
    

    Only after applying all these did my app work properly! I hope that it will help someone...

    0 讨论(0)
  • 2021-01-24 11:11

    To solve this, please add the following line of code in your build.gradle file:

    implementation 'com.google.firebase:firebase-core:16.0.1'
    

    According to the official documentation:

    Your app gradle file now has to explicitly list com.google.firebase:firebase-core as a dependency for Firebase services to work as expected.

    Don't also forget to add in your top level build.gradle file the latest version of Google Play Services:

    classpath 'com.google.gms:google-services:4.0.1'
    

    Please see here more informations.

    0 讨论(0)
  • 2021-01-24 11:14

    From firebase support reply I solved this issue by adding below to progauard rule in future if someone facing this issue try this solution:

    -keepclassmembers enum * {
        public static **[] values();
        public static ** valueOf(java.lang.String);
    }
    
    0 讨论(0)
提交回复
热议问题