到目前为止我还无法找到此错误的修复方法:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'spreadfoundation'.
> Could not resolve all files for configuration ':classpath'.
> Could not find com.eightbitlab:blurview:1.6.3.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/eightbitlab/blurview/1.6.3/blurview-1.6.3.pom
- https://jcenter.bintray.com/com/eightbitlab/blurview/1.6.3/blurview-1.6.3.pom
Required by:
project :
* Get more help at https://help.gradle.org
BUILD FAILED in 12s
at makeError (C:\Users\Victor\Documents\Spread\spread-foundation\node_modules\execa\index.js:174:9)
at C:\Users\Victor\Documents\Spread\spread-foundation\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\Victor\Documents\Spread\spread-foundation\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\Victor\Documents\Spread\spread-foundation\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
我的android/build.gradle:
buildscript {
ext {
buildToolsVersion = "30.0.3"
minSdkVersion = 21
compileSdkVersion = 34
targetSdkVersion = 34
}
repositories {
google()
jcenter()
}
dependencies {
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "30.0.3"
minSdkVersion = 21
compileSdkVersion = 34
targetSdkVersion = 34
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.eightbitlab:blurview:1.6.3'
classpath("com.android.tools.build:gradle:8.0.0")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
//implementation 'com.facebook.fresco:sthetho:2.0.0'
//classpath("com.android.tools.build:gradle:8.0.0")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
(我看到 JCenter 关闭以及一些修复它的方法,我读了这个:https://blog.gradle.org/jcenter-shutdown,但是它不起作用)。
我查看了旧问题,但没有一个有帮助,一些来自 2021 年,一个来自 2023 年。
我在 2020/21 年制作了此应用程序并更新了 API 级别,但我需要再次更新,并且此模块遇到问题。我所做的第一个更正是在几个模块中添加命名空间=“...”,因为它是一个稍微旧的应用程序
在存储库部分中删除 jcenter() 并放入 jitpack jcenter 是一个几乎已弃用的存储库,仅包含旧的依赖项,它应该类似于:
buildscript {
ext {
buildToolsVersion = "30.0.3"
minSdkVersion = 21
compileSdkVersion = 34
targetSdkVersion = 34
}
repositories {
google()
//jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.eightbitlab:blurview:1.6.3'
classpath("com.android.tools.build:gradle:8.0.0")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
错误描述了这种依赖关系不可能进入任何位于那里的存储库