1
votes

I have some errors when I build flutter app called image_picker.

I am using now : Android_studio 3.5.0 Android SDK 29.0 Emulator 10.0 Q Flutter is upgraded with "flutter upgrade".

Launching lib\main.dart on HUAWEI TIT AL00 in debug mode...
Initializing gradle...
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "C:\Users\ksk\AndroidStudioProjects\image_pickers\android\gradlew.bat" exited abnormally:

> Configure project :image_picker

Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':image_picker'.
> Could not resolve all artifacts for configuration ':image_picker:classpath'.
   > Could not resolve com.android.tools.build:gradle:3.3.0.
     Required by:
         project :image_picker
      > Could not resolve com.android.tools.build:gradle:3.3.0.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom'.
               > Connect to dl.google.com:443 [dl.google.com/127.0.1.2] failed: Connection refused: connect
      > Could not resolve com.android.tools.build:gradle:3.3.0.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom'.
            > Could not GET 'https://jcente

r.bintray.com/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom'.

Connect to jcenter.bintray.com:443 [jcenter.bintray.com/127.0.1.3] failed: Connection refused: connect

  • 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 7s Command: C:\Users\ksk\AndroidStudioProjects\image_pickers\android\gradlew.bat app:properties

Finished with error: Please review your Gradle project setup in the android/ folder.

==========     Pubspec.yaml   ================
version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  image_picker: ^0.6.1+11
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2

I want your help. Best regards.

1

1 Answers

1
votes

Seems like the network unable to fetch data to build the gradle tools required. This parts tells me this could be issue.

Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom'.

Or are you working behind proxy?