提问人:Mohsin Atta 提问时间:3/29/2023 更新时间:3/29/2023 访问量:277
org.gradle.api.plugins.UnknownPluginException:未找到 id 为“maven”的插件
org.gradle.api.plugins.UnknownPluginException: Plugin with id 'maven' not found
问:
我已将我的 AGP(Android Gradle 插件)从 4.2.1 更新到 7.2.1,并且在项目同步时更新后出现错误 原因:org.gradle.api.plugins.UnknownPluginException:找不到 id 为“maven”的插件。 下面是我的顶级 Gradle 文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.7.20'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://jitpack.io"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
compileSdkVersion = 33
buildToolsVersion = '30.0.2'
minSdkVersion = 24
targetSdkVersion = 32
// Alert! Read this first...
// for Photo release make sure to comment FFMpeg Library from build.gradle(:app),
// also, in class FFMPEGWatermark.java comment the body of method videoMergeWithFFMpegMethod()
// and imports of FFMpeg Library.
photoAppVersionCode = 1136
photoAppVersionName = '5.2.9'
// Alert! Read this first...
// for video release make sure to uncomment FFMpeg Library from build.gradle(:app),
// also, in class FFMPEGWatermark.java uncomment the body of method videoMergeWithFFMpegMethod()
// and imports of FFMpeg Library.
videoAppVersionCode = 583
videoAppVersionName = '2.1.9'
}
我尝试在每个模块中单独应用插件:“maven”,但没有取得任何成功。
答: 暂无答案
评论