dashuai01
Warning:<i><b>root project \'netty_lecture\': Unable to resolve additional project configuration.</b>
Details: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration \':compileClasspath\'.
Caused by: org.gradle.internal.resolve.ArtifactResolveException: Could not download protobuf-java.jar (com.google.protobuf:protobuf-java:3.5.1)
Caused by: org.gradle.api.resources.ResourceException: Could not get resource \'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.5.1/protobuf-java-3.5.1.jar\'.
Caused by: java.net.SocketTimeoutException: Read timed out</i>

引入Google protobuf的时候报上述错误

group \'com.jiangdashuai\'
version \'1.0\'

apply plugin: \'java\'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
//    testCompile group: \'junit\', name: \'junit\', version: \'4.12\'
    compile(
             \'io.netty:netty-all:4.1.19.Final\',
            \'com.google.protobuf:protobuf-java:3.5.1\',
            \'com.google.protobuf:protobuf-lite:3.0.1\'
    )
}

将引入的插件

apply plugin: \'java\'

改为

apply plugin: \'java\'
apply plugin: \'idea\'

 

分类:

技术点:

相关文章:

  • 2021-09-11
  • 2022-01-03
  • 2021-10-12
  • 2021-10-29
  • 2022-01-04
  • 2021-09-29
猜你喜欢
  • 2022-02-09
  • 2021-06-21
  • 2022-12-23
  • 2021-05-04
  • 2022-12-23
  • 2021-12-15
  • 2021-05-26
相关资源
相似解决方案