对com.google.firebase.functions.ContextProvider的依赖性不令人满意

时间:2019-02-26 12:36:43

标签: android firebase google-cloud-functions

尝试添加Firebase函数依赖项com.google.firebase:firebase-functions:16.1.3会导致以下运行时异常。有人知道如何解决这个问题吗?

java.lang.RuntimeException: Unable to create application com.test.nsa: com.google.firebase.components.MissingDependencyException: Unsatisfied dependency for component Component<[interface com.google.firebase.functions.ContextProvider]>{0, deps=[Dependency{anInterface=interface com.google.firebase.iid.internal.FirebaseInstanceIdInternal, required=true, direct=false}, Dependency{anInterface=interface com.google.firebase.auth.internal.InternalAuthProvider, required=false, direct=false}]}: interface com.google.firebase.iid.internal.FirebaseInstanceIdInternal
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6100)
    at android.app.ActivityThread.-wrap1(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1791)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:7000)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
 Caused by: com.google.firebase.components.MissingDependencyException: Unsatisfied dependency for component Component<[interface com.google.firebase.functions.ContextProvider]>{0, deps=[Dependency{anInterface=interface com.google.firebase.iid.internal.FirebaseInstanceIdInternal, required=true, direct=false}, Dependency{anInterface=interface com.google.firebase.auth.internal.InternalAuthProvider, required=false, direct=false}]}: interface com.google.firebase.iid.internal.FirebaseInstanceIdInternal
    at com.google.firebase.components.ComponentRuntime.validateDependencies(com.google.firebase:firebase-common@@16.0.4:103)
    at com.google.firebase.components.ComponentRuntime.<init>(com.google.firebase:firebase-common@@16.0.4:61)
    at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.0.4:539)
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.4:355)
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.4:324)
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.4:310)

1 个答案:

答案 0 :(得分:0)

在将Firebase与动态功能模块一起使用时,我遇到了同样的问题。通过在:app模块中复制依赖项来进行修复。