【问题标题】:Gradle Core Plugins (plugin is not in 'org.gradle' namespace)Gradle 核心插件(插件不在 \'org.gradle\' 命名空间中)
【发布时间】:2022-11-20 20:00:34
【问题描述】:

是什么导致了这个构建错误:


- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:7.0.3')
  Searched in the following repositories:
    Gradle Central Plugin Repository
    Google

在 build.gradle 文件中

期待成功的android构建

【问题讨论】:

标签: android android-studio gradle android-gradle-plugin build.gradle


【解决方案1】:

在我的例子中,settings.gradle 文件丢失了。您可以创建一个文件并将其放入项目根文件夹中。

设置.gradle:

pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}
rootProject.name = "android-geocode"
include ':app'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-01
    • 2012-03-02
    • 1970-01-01
    • 2013-10-29
    • 2023-03-31
    • 1970-01-01
    相关资源
    最近更新 更多