I'm having trouble getting started with flutter. I run flutter create foo, no issue.
I then go into foo and run flutter run, which gets the error listed below.
I would appreciate your help if possible and whenever you can.
flutter run
Launching lib/main.dart on Nexus 5 in debug mode...
Initializing gradle... 1.0s
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "/Users/stargator/Workspace/foo/android/gradlew" exited abnormally:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.> Could not resolve all artifacts for configuration ':classpath'.> Could not resolve com.android.tools.build:gradle:3.2.1.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.2.1.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.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
BUILD FAILED in 1s
Command: /Users/stargator/Workspace/foo/android/gradlew app:properties
Please review your Gradle project setup in the android/ folder.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.13.1 17B48, locale en-US)[✓] Android toolchain - develop for Android devices (Android SDK 28.0.0)[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)[✓] Android Studio (version 3.2)[✓] IntelliJ IDEA Ultimate Edition (version 2018.3)[✓] Connected device (1 available)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey @abraham ,
I'm having trouble getting started with flutter. I run
flutter create foo
, no issue.I then go into
foo
and runflutter run
, which gets the error listed below.I would appreciate your help if possible and whenever you can.
What happens when you run
flutter doctor
?By the way, running on an emulator seems to work fine from the command line.
I'll have to try again (now that I am at home and not on my work's network) and see if I can run it on my Android device.
Gave it a try, seems like it has to do with my work's network blocking the dependencies for gradle
Interesting. I'd recommend opening an issue with the Flutter team. That's something that
flutter doctor
should probably test for.