原因:找不到id为'com.android.application‘的org.gradle.api.plugins.UnknownPluginException:插件。
依赖项{实现包含(目录:'libs',fileTree:'*.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')}
发布于 2020-05-20 14:34:12
检查您是否拥有顶级build.gradle文件(项目级),并确认定义了以下内容。
dependencies {
classpath 'com.android.tools.build:gradle:x.x.x'
}项目级别位于:
Project-name/build.gradle
而应用程序级别位于:
Project-name/app/build.gradle
设置完成后,在android studio终端上运行以下命令,并密切关注可能会在输出中引发进一步问题的情况。
./gradlew build -i 请参阅答案here
https://stackoverflow.com/questions/61906332
复制相似问题