【发布时间】:2021-07-28 18:29:48
【问题描述】:
在 Android Studio 4.2 中有一个警告:
buildscript {
ext.kotlin_version = '1.5.0'
repositories {
google()
//jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
//jcenter()
mavenCentral()
}
}
如果我删除jcenter(),那么它找不到我的应用项目的一些依赖项:
> Could not find org.koin:koin-core:2.0.1.
Required by:
project :app
> Could not find org.koin:koin-androidx-scope:2.0.1.
Required by:
project :app
> Could not find org.koin:koin-androidx-viewmodel:2.0.1.
Required by:
project :app
> Could not find com.google.ads.mediation:chartboost:8.1.0.0.
Required by:
project :app
代替jcenter(),我添加了mavenCentral()
【问题讨论】:
-
我猜你需要检查不同的缺失 JAR 的主页,看看你将来可能从哪里得到它们。
标签: android maven android-studio android-gradle-plugin jcenter