'Issue while migrating Gradle version from 6.5 to 7.0

Could not resolve all dependencies for configuration ':debugRuntimeClasspath'. Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven5(http://download.flutter.io)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.0/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.



Solution 1:[1]

You either have to enable HTTPS for your custom repository or you have to change your repository definition to allow the insecure HTTP, like in the following example:

maven { url "http://[YOUR_REPOSITORY_URL]"; allowInsecureProtocol true }

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 J.M.