報錯信息 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包了。至此解決問題