编译无法完成:程序类型已经存在:com.google.android.gms.internal

编译我的项目时,出现以下错误消息:


Program type already present: com.google.android.gms.internal.measurement.zzabn Message{kind=ERROR, text=Program type already present: com.google.android.gms.internal.measurement.zzabn, sources=[Unknown source file], tool name=Optional.of(D8)}

要么


D8: Program type already present: com.google.android.gms.internal.measurement.zzabo

在Gradle Log中使用以下stacktrace


at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)     

at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)   

at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:212)\\nat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)

at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)

at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)

at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)

at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)

at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)

繁花如伊
浏览 1988回答 3
3回答

缥缈止盈

就我而言,问题是相同的。我遵循以下步骤:1.build.gradle(渐变)变化:  classpath 'com.google.gms:google-services:3.2.0'至 :  classpath 'com.google.gms:google-services:3.2.1'2.build.gradle(模块)    implementation 'com.google.firebase:firebase-core:15.0.2'    implementation 'com.google.firebase:firebase-messaging:15.0.2'    implementation 'com.google.android.gms:play-services-maps:15.0.1'对于Google的位置和地点:  implementation 'com.google.android.gms:play-services-location:15.0.1'  implementation 'com.google.android.gms:play-services-places:15.0.1'
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java
Android