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包了。至此解决问题
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步