'Using insecure protocols with repositories build.gradle react native
I'm trying to install this library https://github.com/januslo/react-native-bluetooth-escpos-printer after manually linking it to the project I got this error
A problem occurred configuring project ':react-native-bluetooth-escpos-printer'.
Could not resolve all dependencies for configuration ':react-native-bluetooth-escpos-printer:classpath'. Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'BintrayJCenter(http://jcenter.bintray.com/)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.
The issue is probably here in this file build.gradle
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation project(':react-native-bluetooth-escpos-printer')
...
}
I'm aware that I should use allowInsecureProtocol but as I'm not familiar with Java I'm not sure how to achieve the same result as in the code below
maven { url "http://myorg.example/repo"; 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 |
|---|
