gradle - Could not resolve all dependencies for configuration ':detachedConfiguration4'.Using insecure protocols with repositories, without explicit opt-in, is unsupported.

2022. 5. 9. 14:27CM/Gradle

반응형

넥서스에 있는 것을 가져오려는데 오류가 났다.

에러발생
Could not resolve all dependencies for configuration ':detachedConfiguration4'.Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven(http://maven.xxx.com/어쩌구저쩌구)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.4.1/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details. 

 

해결

최신 gradle에서는 보안을 위해 http 서버를 사용하는것을 허용하지 않는다.
그래서 http 서버를 사용하게 하려면 아래처럼 true로 줘야 한다.
allowInsecureProtocol true으로 하여 해결

 

repositories {
    mavenCentral()
    maven {
        url 'http://maven.djWjrn.wjWjrn/dadd-public'
        allowInsecureProtocol true
    }
    gradlePluginPortal()
}

 

 

반응형
LIST