Android发现多个文件具有独立于操作系统的路径';google/protobuf/type.proto';

Android发现多个文件具有独立于操作系统的路径';google/protobuf/type.proto';,android,firebase-cloud-messaging,Android,Firebase Cloud Messaging,我想将com.google.firebase:firebase admin:7.1.1添加到我的项目中 同步后,我得到以下错误: * What went wrong: Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. > More than one file was found with OS independent path 'google/protobuf/type.proto'

我想将com.google.firebase:firebase admin:7.1.1添加到我的项目中

同步后,我得到以下错误:

* What went wrong:
Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> More than one file was found with OS independent path 'google/protobuf/type.proto'
我使用本教程:

此外,我还添加了这一部分:

packagingOptions {
        exclude 'project.properties'
        exclude 'META-INF/INDEX.LIST'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/native-image/io.netty/codec-http/native-image.properties'
        exclude 'META-INF/io.netty.versions.properties'
        exclude 'META-INF/native-image/io.netty/common/native-image.properties'
        exclude 'META-INF/native-image/io.netty/transport/native-image.properties'
        exclude 'META-INF/native-image/io.netty/transport/reflection-config.json'
        exclude 'META-INF/native-image/io.netty/buffer/native-image.properties'
        exclude 'META-INF/native-image/io.netty/handler/native-image.properties'
    }

尝试添加以下代码可能会有所帮助:

 exclude("google/protobuf/type.proto")   
你可以参考这个