Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

More than one file was found with OS independent path 'lib/mips/libRSSupport.so' when using buildToolsVersion 28.0.1

I have update my buildToolsVersion from 27.0.3 to 28.0.1. When i compile my project, i have compile error:

More than one file was found with OS independent path 'lib/mips/libRSSupport.so'  

When i click on Build->Run build, i see this:

org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'.    
...  
Caused by: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'.
    at org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:74)
    at org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:49)
    at org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:39)
    at org.gradle.initialization.StackTraceSanitizingExceptionAnalyser.transform(StackTraceSanitizingExceptionAnalyser.java:30)  
...  
Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)  
...  
Caused by: com.android.builder.merge.DuplicateRelativeFileException: More than one file was found with OS independent path 'lib/mips/libRSSupport.so'
    at com.android.builder.merge.StreamMergeAlgorithms.lambda$acceptOnlyOne$2(StreamMergeAlgorithms.java:75)
    at com.android.builder.merge.StreamMergeAlgorithms.lambda$select$3(StreamMergeAlgorithms.java:100)
    at com.android.builder.merge.IncrementalFileMergerOutputs$1.create(IncrementalFileMergerOutputs.java:86)
    at com.android.builder.merge.DelegateIncrementalFileMergerOutput.create(DelegateIncrementalFileMergerOutput.java:61)

How to fix this error? Or is it bug of Google Build Tools?

like image 859
Tomas Avatar asked Aug 03 '18 07:08

Tomas


1 Answers

A temporary solution is to add this to your build.gradle (app level) inside android {}

packagingOptions {
    exclude "lib/mips/libRSSupport.so"
    exclude "lib/mips/librsjni.so"
}
like image 156
Blessing Charumbira Avatar answered Nov 07 '22 08:11

Blessing Charumbira