【问题标题】:Gradle method not found:'compile' possible causes : The Project未找到 Gradle 方法:“编译”可能的原因:项目
【发布时间】:2020-04-13 00:32:11
【问题描述】:

dependencies {
        classpath 'com.android.tools.build:gradle:3.5.2'


        compile 'com.android.support:appcompat-v7:24.1.1'
        compile 'com.android.support:design:24.1.1'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

我正在尝试将编译方法添加到 build.gradle 但我遇到了这个问题 我有 android studio 3.5.2

和5.4.1 gradle

【问题讨论】:

    标签: java android android-studio build.gradle


    【解决方案1】:

    您可以将compile 替换为implementation

    implementation 'com.android.support:appcompat-v7:24.1.1'
    implementation 'com.android.support:design:24.1.1'
    

    但是您将依赖项放入您的 build.gradle 模块项目中。将它们放在build.gradle 模块应用程序中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-05
      • 2014-01-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-05
      • 1970-01-01
      相关资源
      最近更新 更多