javascript - 我已经下载了我想在我的 Visual Studio 项目 EXPO 中使用的最新版本的 Gradle 7.3
问题描述
我仔细检查了是否安装了它..
摇篮 7.3
所以没关系..当我输入命令 gradle --daemon 时问题来了
我收到这个错误
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'RentInCars'.
> Could not resolve all files for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:7.2.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.2/gradle-7.2.pom
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.2/gradle-7.2.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/7.2/gradle-7.2.pom
Required by:
project :
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3/userguide/command_line_interface.html#sec:command_line_warnings
我尝试使用 sudo gradle --daemon.. 仍然给我同样的错误.. 我接下来应该尝试什么?
解决方案
正如我们在评论中所讨论的,您需要 VPN 但不需要任何 VPN。
您必须知道您的 vpn 在哪个端口上工作。
例如,如果你下载了 psiphone,你可以去设置,然后本地代理端口,你可以添加 12345 作为例如端口。
然后你需要去 .gradle 文件夹,如果你使用的 windows 它通常位于 USER/%USERNAME%/.gradle ,并创建一个全局 gradle.properties 然后添加以下内容。
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=12345
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=12345
这将重定向所有 gradle 连接抛出您的代理,例如 psiphone。
推荐阅读
- amazon-web-services - AWS CloudWatch Events - 获取资源标签
- flutter - 无法构建颤振应用程序 IOS - mapbox_map.dart:14:5: 错误:“必需”不是类型。需要 this.initialCameraPosition
- html - 我应该怎么做才能点击 react-router 的链接标签内的按钮,而不导航到该链接?
- firebase - 在构建 Wrapper(dirty) 时引发了以下 ProviderNotFoundException:错误:找不到正确的提供程序
在此 Wrapper Widget 上方 - discord.js - 设置超时以删除嵌入 discord.js 上的消息
- r - 在 ggplot 如何使填充参数在 geom_dotplot() 中起作用
- image - PowerShell:Get-ChildItem 列出元数据中包含某些“标签”关键字的 .jpg 文件名 | 导出为 CSV
- r - 如何仅显示与 r 中折线图中前 4 个最高值相对应的日期
- c# - 从 c# 到 vb.net 的转换函数无法正常工作
- python - 来自谷歌地球工作室的相机数据