Sudhanshu Jaisani
Sudhanshu Jaisani

Reputation: 151

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

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.

Upvotes: 1

Views: 2337

Answers (5)

Ravi Ranjan
Ravi Ranjan

Reputation: 1

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:

File -> Project Structure(or press Ctrl+Alt+Shift+S). Project-> Update the Latest Gradle Plugin Version then Apply and ok, or Update the Project Gradle Plugin Version they work for me.

Upvotes: 0

Deeksha
Deeksha

Reputation: 576

Invalidate Cache & Restart didn't work for me.

Try,

  1. Build -> Clean Project

  2. Build -> Rebuild project

Upvotes: 2

yfdgvf asdasdas
yfdgvf asdasdas

Reputation: 170

Update your android sdk, partial installations cause this problem.

Upvotes: 0

Or Azoulay
Or Azoulay

Reputation: 219

File -> Invalidate Caches/Restart -

Upvotes: 0

Iaka Noe
Iaka Noe

Reputation: 43

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.

Upvotes: 2

Related Questions