Flutter错误:无法下载bcprov-jdk15on.jar(org.bouncycastle:bcprov-jdk15on:1.56) [英] Flutter error: Could not download bcprov-jdk15on.jar (org.bouncycastle:bcprov-jdk15on:1.56)
问题描述
我无法运行我的第一个Flutter应用程序.出现以下错误.
I'm failing to run my first ever Flutter App. Getting the below error.
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
* Error running Gradle:
Exit code 1 from:
D:\PROJECTS\softwareProjects\AndroidProjects\flutter_app_2\android\gradlew.bat
app:properties:
Download https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.jar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
> Could not download bcprov-jdk15on.jar (org.bouncycastle:bcprov-jdk15on:1.56)
Finished with error: Please review your Gradle project setup in the android/ folder.
> Could not get resource 'https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.jar'.
> Response 304: Not Modified has no content!
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
Flutter医生没有出现任何问题 扑医生的输出:
Flutter doctor is not giving any problem output of flutter doctor:
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.1.5, on Microsoft Windows [Version 10.0.16299.309], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[√] Android Studio (version 3.0)
[√] Connected devices (1 available)
• No issues found!
Flutter Analysis仍然会出现一些错误!
Flutter Analysis gives some errors though!
推荐答案
在发布时,jCenter在处理某些工件时存在/正在出现问题. 此gradle问题跟踪修复过程以及bintray的
At the time of posting, jCenter is/was having an issue serving certain artifacts. This gradle issue tracks progress on the fix, and bintray's status page has an entry for March 17, 2018 detailing the problem.
一个临时的解决方法是使用mavenCentral而不是jCenter(或至少首先使用它).
A temporary workaround is to use mavenCentral instead of jCenter (or at least use it first).
这可以通过更改存储库gradle的使用来完成.由于这是一个android项目,因此约定似乎按如下方式使用allprojects:
This can be done by changing the repositories gradle uses. Since this is an android project the convention seems to be using allprojects as follows:
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
这篇关于Flutter错误:无法下载bcprov-jdk15on.jar(org.bouncycastle:bcprov-jdk15on:1.56)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!