首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在颤振应用程序中包含firebase_storage的最佳方法是什么?

在颤振应用程序中包含firebase_storage的最佳方法是什么?
EN

Stack Overflow用户
提问于 2019-03-27 21:53:45
回答 1查看 242关注 0票数 0

我需要在Firebase中存储几个文件。我在使用android仿真器。问题是:当我将包包含在yaml (firebase_storage)中时,我得到了一个很大的错误,比如下一个:

代码语言:javascript
复制
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.firebase:firebase-storage:16.0.3.
  Required by:
      project :app > project :firebase_storage
   > Could not resolve com.google.firebase:firebase-storage:16.0.3.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-storage/16.0.3/firebase-storage-16.0.3.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-storage/16.0.3/firebase-storage-16.0.3.pom'.
            > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not resolve com.google.firebase:firebase-storage:16.0.3.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-storage/16.0.3/firebase-storage-16.0.3.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-storage/16.0.3/firebase-storage-16.0.3.pom'.
            > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not resolve com.google.firebase:firebase-storage:16.0.3.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-storage/16.0.3/firebase-storage-16.0.3.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-storage/16.0.3/firebase-storage-16.0.3.pom'.
            > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not resolve com.google.firebase:firebase-storage:16.0.3.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-storage/16.0.3/firebase-storage-16.0.3.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-storage/16.0.3/firebase-storage-16.0.3.pom'.
            > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run
with --scan to get full insights.

* Get more help at https://help.gradle.org

我尝试在我的颤振项目中设置一个防火墙项目,遵循google官方页面给出的步骤。我也尝试将这些代码添加到我的android/gradle中:

代码语言:javascript
复制
subprojects{
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.support'
            && !details.requested.name.contains('multidex')) {
                details.useVersion "26.1.0"
            }
        }
    }
}

目前,我无法运行我的应用程序,因为这一点。我想知道在防火墙中存储文件的最佳方法是什么。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-03-28 02:25:16

考虑遵循这个codelab,或者阅读这里,以防你错过了一个步骤。(google-services.json或SHA密钥等)

如果您都设置好了,那么它可能与AndroidX有关。

当您检查changelog.md时,您会在版本0.9.0上看到一个破坏更改

尝试通过使用AndroidX来避免以前的软件包,或者将您的项目迁移转换为AndroidX。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55387060

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档