【发布时间】:2021-01-09 22:39:57
【问题描述】:
我正在开发一个 react-native 项目 V 0.59.5 我正在尝试将其 升级 到 V 0.63.3 我试图解决 android studio 中出现的问题,我将 android studio 更新到 4.1.1,然后有一条消息建议将 gradle 升级到版本 4.1.1,我使用的是 3.5.3。
我升级了 grale 版本,之后我遇到了一个我无法解决的错误,我找不到有用的分析器。我尝试删除 .gradle 文件夹中的缓存文件夹并重新启动 android studio 但没有帮助。更改 gradle 版本也无济于事。 这是错误:
Could not find com.android.tools.build:gradle:4.1.1.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.1/gradle-4.1.1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :react-native-fs
Add google Maven repository and sync project
Open File
我手动将 gradle 更改为之前的状态。
在我的 gradle-wrapper.properties 我有:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
在 build.grale 文件中我有:
classpath('com.android.tools.build:gradle:3.5.3')
【问题讨论】:
标签: android react-native android-studio gradle