我需要在Firebase中存储几个文件。我在使用android仿真器。问题是:当我将包包含在yaml (firebase_storage)中时,我得到了一个很大的错误,比如下一个:
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中:
subprojects{
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex')) {
details.useVersion "26.1.0"
}
}
}
}目前,我无法运行我的应用程序,因为这一点。我想知道在防火墙中存储文件的最佳方法是什么。
https://stackoverflow.com/questions/55387060
复制相似问题