Error:Execution failed for task':app:transformResourcesWithMergeJavaResForDebug'.> More than one ...

Error:Execution failed for task':app:transformResourcesWithMergeJavaResForDebug'.> More than one file was found with OS independent path 'META-INF/rxjava.properties'

(错误大致意思为:存在一个违规操作,类似于RXJava)

解决方案:在build.gradle(app)android下添加

  packagingOptions {

        exclude 'META-INF/DEPENDENCIES.txt'

        exclude 'META-INF/NOTICE'

        exclude 'META-INF/NOTICE.txt'

        exclude 'META-INF/LICENSE'

        exclude 'META-INF/LICENSE.txt'

        exclude 'META-INF/rxjava.properties'

        exclude 'META-INF/rxjava.PROPERTIES'

        exclude 'META-INF/RXJAVA.properties'

        exclude 'META-INF/RXJAVA.PROPERTIES'

        exclude 'META-INF/rxjava'

        exclude 'META-INF/RXJAVA'

    }

然后重新编译即可

你可能感兴趣的:(Error:Execution failed for task':app:transformResourcesWithMergeJavaResForDebug'.> More than one ...)