Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
362 views
in Technique[技术] by (71.8m points)

android - Firebase admin sdk not syncing with the gradle

I have incorporated some libraries into my android app. I have connected it with Firebase cloud server. Now, I want to create tokens for User authentication. Firebase asks to add Firebase Admin Sdk to the gradle File. However, it shows error on building the gradle. The sdk I am adding is compile 'com.google.firebase:firebase-admin:5.3.1'

Following is the error:

Error:Conflict with dependency 'com.google.code.findbugs:jsr305' in project ':app'. Resolved versions for app (3.0.0) and test app (2.0.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.

My original code is :

apply plugin: com.android.application

android {

compileSdkVersion 25

buildToolsVersion "25.0.2"

defaultConfig {

    applicationId "com.example.delluser.oshoguide"

    minSdkVersion 17

    targetSdkVersion 25

    versionCode 1

    versionName "1.0"

    testInstrumentationRunner

 "android.support.test.runner.AndroidJUnitRunner"

}
buildTypes {

    release {

        minifyEnabled false

        proguardFiles getDefaultProguardFile('proguard-android.txt'),

 'proguard-rules.pro'
    }
}

packagingOptions
        {

            exclude 'META-INF/notice'
            exclude 'META-INF/notice.txt'
            exclude 'META-INF/license'
            exclude 'META-INF/license.txt'
        }

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',{
    exclude group: 'com.android.support', module: 'support-annotations'
})

compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-crash:11.0.1'
compile 'com.google.firebase:firebase-auth:11.0.1'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.google.firebase:firebase-messaging:11.0.1'
compile 'com.google.firebase:firebase-storage:11.0.1'
compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.firebaseui:firebase-ui:0.6.2'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-admin:5.3.1'

testCompile 'junit:junit:4.12'
}


apply plugin: 'com.google.gms.google-services'`
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...