【问题标题】:Error while updating gradling with lower version and v7使用较低版本和 v7 更新 gradling 时出错
【发布时间】:2020-05-20 06:16:10
【问题描述】:

原因:org.gradle.api.plugins.UnknownPluginException:未找到 ID 为“com.android.application”的插件。

依赖{ 实现 fileTree(dir: 'libs', include: ['*.jar'])

testImplementation 'junit:junit:4.12'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:24.2.0'
implementation 'com.google.android.gms:play-services-vision:20.0.0'
compile files('libs/scanning.jar')

}

【问题讨论】:

    标签: android gradle android-gradle-plugin barcode-scanner


    【解决方案1】:

    检查您是否拥有顶级 build.gradle 文件(项目级别)并确认已定义以下内容。

    dependencies {
        classpath 'com.android.tools.build:gradle:x.x.x'
    }
    

    项目级别位于:

    项目名称/build.gradle

    应用级别位于:

    项目名称/app/build.gradle

    设置完成后,在 android studio 终端上运行以下命令,并密切关注可能仍会在输出中引发任何进一步问题的内容。

     ./gradlew build -i 
    

    参考答案here

    【讨论】:

      猜你喜欢
      • 2017-04-17
      • 1970-01-01
      • 1970-01-01
      • 2021-11-12
      • 1970-01-01
      • 2021-01-31
      • 2022-12-23
      • 2021-02-03
      • 2021-05-02
      相关资源
      最近更新 更多