我在android studio中的项目级build.gradle文件中收到此警告。
Warning:(22, 9) JCenter Maven repository is no longer receiving updates: newer library versions may be available elsewhere
做该做的事。我试着删除它,得到了一个很长的错误列表,如下所示。
> Could not resolve all files for configuration ':classpath'.
> Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.7.10/kotlin-stdlib-jdk8-1.7.10.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 : > com.android.tools.build:gradle:7.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools.build:gradle-settings-api:7.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools:sdk-common:30.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools:repository:30.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools.build:aaptcompiler:7.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools.analytics-library:shared:30.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools.lint:lint-model:30.4.2
project : > com.android.tools.build:gradle:7.4.2 > androidx.databinding:databinding-compiler-common:7.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools.utp:android-test-plugin-host-retention-proto:30.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools.build:builder:7.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools.build:builder-model:7.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools.build:gradle-api:7.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools:sdk-common:30.4.2 > com.android.tools:common:30.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools.build:builder:7.4.2 > com.android.tools.analytics-library:tracker:30.4.2
project : > com.android.tools.build:gradle:7.4.2 > com.android.tools.build:builder:7.4.2 > com.android.tools.build:manifest-merger:30.4.2
> Could not find org.apache.httpcomponents:httpmime:4.5.6.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/apache/httpcomponents/httpmime/4.5.6/httpmime-4.5.6.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.....
可能的解决方案如下:
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
我该怎么做才能解除警告?
这是我的项目级build.gradle,在这里我得到了警告:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.google.gms:google-services:4.3.15'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
1条答案
按热度按时间laawzig21#
已解决:要删除此警告,请替换:
与