I'm trying to build a Flutter app for android. I followed the official setup guidelines from flutter website and created the default project and then run on an emulator.
This is the error I get:
> Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-d44b5a94c976fbb65815374f61ab5392a220b084/x86_debug-1.0.0-d44b5a94c976fbb65815374f61ab5392a220b084.pom'.
> Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-d44b5a94c976fbb65815374f61ab5392a220b084/x86_debug-1.0.0-d44b5a94c976fbb65815374f61ab5392a220b084.pom'.
> The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties
> 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 993ms
[!] Gradle threw an error while downloading artifacts from the network.
If I put the url in the browser I can donwload the .pom file, I really don't understand why I get this error.
This is the result of my flutter doctor -v
:
[√] Flutter (Channel stable, 3.10.0, on Microsoft Windows [Versione 10.0.22621.1848], locale it-IT)
• Flutter version 3.10.0 on channel stable at C:\SDK\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 84a1e904f4 (6 weeks ago), 2023-05-09 07:41:44 -0700
• Engine revision d44b5a94c9
• Dart version 3.0.0
• DevTools version 2.23.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\Users\gazzi.n\AppData\Local\Android\sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Professional 2022 17.6.3)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Professional
• Visual Studio Professional 2022 version 17.6.33801.468
• Windows 10 SDK version 10.0.22000.0
[√] Android Studio (version 2022.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
[√] VS Code (version 1.79.2)
• VS Code at C:\Users\gazzi.n\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.66.0
[√] Connected device (4 available)
• sdk gphone x86 64 (mobile) • emulator-5554 • android-x64 • Android 13 (API 33) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Versione 10.0.22621.1848]
• Chrome (web) • chrome • web-javascript • Google Chrome 114.0.5735.134
• Edge (web) • edge • web-javascript • Microsoft Edge 114.0.1823.51
[√] Network resources
• All expected network resources are available.
• No issues found!
I'm on Windows 11 and in my network settings I enabled TLS 1.0,1.1,1.2,1.3.
I tired almost everything I found online such as update to flutter 3.10.5, delete and reinstall flutter, create lots of new projects, change gradle files configuration... I'm in a company with firewall, but nothing seems to block my requests to the network.
Can someone help me with this error please? If other info or files are needed feel free to ask.
Thank you