rn Could not download kotlin-compiler-embeddable 各种包下载不下来,下载超时

报错信息 Could not download kotlin-compiler-embeddable-1.3.50.jar

A problem occurred configuring project ':react-native-webview'.
> Could not resolve all artifacts for configuration ':react-native-webview:classpath'.
   > Could not download kotlin-compiler-embeddable-1.3.50.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50)
      > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.jar'.
         > Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.jar'.
            > Read timed out

1. 手动去下载

  进入仓库网址链接: https://mvnrepository.com/

2. 搜索需要的包 

搜索:kotlin-compiler-embeddable

  

 

3. 点开详情

 

 

 

 4. 选择版本

  

 

 

 

5. 点击下载

  

 

 

 

6. 配置下载jar文件到 .gradle 文件中 

需要注意的是:找到你自己的用户名下面的目录把我这里的hhlt换成你自己用户名

参考:注意看图上面的红色文字

 

 

  

/Users/用户/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.3.50/3c003f60a655f2393bb2b2ad4e9d0de610230448

替换成 

/Users/用户/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.jar

 

7. 如果不知道替换的地址  

    a. 把该jar包放在一个新项目的libs中
    b. 然后重新build这个项目,build成功以后,该jar包就在本地的C盘的.gradle文件夹中的缓存中出现了缓存jar文件。
    c. 这个时候再重新打开你的项目,就不会再去下载这个棘手的jar包了。至此解决问题

 

 

posted @ 2022-03-17 20:02  zhengyan_web  阅读(2453)  评论(1编辑  收藏  举报