昨天,我的应用程序工作正常.
今天,我不知道为什么,在重新打开Android Studio后,应用程序不再编译了.
显示的错误是
Program type already present: com.google.android.gms.internal.measurement.zzwp
Message{kind=ERROR, text=Program type already present: com.google.android.gms.internal.measurement.zzwp, sources=[Unknown source file], tool name=Optional.of(D8)}
Run Code Online (Sandbox Code Playgroud)
我真的不知道发生了什么,我搜索了一切,没有任何效果.如果有人可以帮助我,我真的很感激.我更改了所有依赖项和库以尝试解决它,但没有任何效果.
这是build.gradle项目
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.google.gms:google-services:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'https://jitpack.io' }
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
这是我的build.gradle模块:app
apply plugin: 'com.android.application'
android …Run Code Online (Sandbox Code Playgroud)