More than one file was found with OS independent path 'lib/x86/libc++_shared.so'

Andrews encountered when running react-native this error, before the error has encountered an error,

none of the consumable configurations have attributes

This is the third-party libraries wrong Times in link project introduced, this means that the link wrong when I did not find this third-party libraries, so I put ***. Iml android is following this project file deleted, then the third library deleted, and re-install it again, android studio and then click on the link to recompile successful, but later reported the wrong topic, online search, it means the wrong local projects and third-party library reference the same .so file, or two third-party libraries introduce the same .so file, causing the compiler does not know at the time what the main solution is, build.gradle file in android / app directory of the android adding such a line of code in the {}

packagingOptions {
        pickFirst 'lib/x86/libc++_shared.so'
        pickFirst 'lib/arm64-v8a/libc++_shared.so'
        pickFirst 'lib/armeabi-v7a/libc++_shared.so'
        pickFirst 'lib/x86_64/libc++_shared.so'
    }    

Figure

That's it, record it

Published 27 original articles · won praise 6 · views 20000 +

Guess you like

Origin blog.csdn.net/github_37673306/article/details/103804274