1

I've been working with Firebase Database.The code was working fine for Firebase Authentication but showed this error message when added Firebase Database.

Incorrect value for field 'Signature': value is 662655099 but 67324752 expected.

Following is the gradle script:

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


android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.sudhanshujaisani.mywhatsapp"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner             
"android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.android.support:support-v4:27.1.1'
    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'
    implementation 'com.android.support:design:27.1.1'
    implementation 'de.hdodenhof:circleimageview:3.0.0'
    implementation 'com.google.firebase:firebase-auth:16.0.1'
    implementation 'com.google.firebase:firebase-database:16.0.1'


}

Thanks in advance.

4 Answers4

2

I don't really know what causes this error but I had it too and I figured out (after some research) that it's something going on with Instant Run. It hasn't got anything to do with firebase, but I think it's something about Gradle and importing packages.

Anyway, I figured disabling Instant Run as a simple workaround and it worked! :)

In Android Studio:

  1. File -> Settings (or press Ctrl+Alt+S).
  2. Build, Execution, Deployment -> Instant Run (on the left panel).
  3. Uncheck the first checkbox "Enable Instant Run to hot swap code/resource changes on deploy (default enabled)".

If you actually need Instant Run, this workaround won't help. I'm still trying to find the actual solution.

Iaka Noe
  • 43
  • 8
2

Invalidate Cache & Restart didn't work for me.

Try,

  1. Build -> Clean Project

  2. Build -> Rebuild project

Deeksha
  • 536
  • 5
  • 14
0

File -> Invalidate Caches/Restart -

Or Azoulay
  • 179
  • 2
0

Update your android sdk, partial installations cause this problem.

yfdgvf asdasdas
  • 170
  • 1
  • 9