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:\项目\ softwareProjects \ AndroidProjects \ flutter_app_2 \机器人\ gradlew.bat 应用:特性: 下载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 doctor is not giving any problem
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 gives some errors though!
答案 0 :(得分:3)
在发布时,jCenter服务某些工件存在问题。 This gradle issue跟踪修复的进度,bintray的status page有一个2018年3月17日的条目,详细说明问题。
临时解决方法是使用mavenCentral而不是jCenter(或者至少先使用它)。
这可以通过更改gradle使用的存储库来完成。由于这是一个android项目,因此约定似乎使用allprojects如下:
$request_tbl = new requests_table();
$users = $request->users;
$request_tbl->users()->sync($users);