Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android compilation error using it with React Native module libgnustl_shared.so, libfb.so duplication #32

Closed
pranayairan opened this issue Jun 12, 2018 · 3 comments
Labels

Comments

@pranayairan
Copy link

When integrating Sonar on a project with React Native as a dependency, I get a lot of DuplicateRelativeFileException with libgnustl_shared, libfb etc.

This is happening due to the dependency of our app on React Native. I was able to fix this issue by putting this in our gradle file

android {
        packagingOptions {
            pickFirst 'lib/armeabi-v7a/libgnustl_shared.so'
            pickFirst 'lib/x86/libgnustl_shared.so'
            pickFirst 'lib/armeabi-v7a/libfb.so'
            pickFirst 'lib/x86/libfb.so'
            pickFirst 'lib/armeabi-v7a/libglog.so'
            pickFirst 'lib/x86/libglog.so'
        }
    }

Submitting the issue so others can fix it.

@pranayairan
Copy link
Author

i am still having different issues after making the change, I am unable to run it. I sometimes get this error
Multiple dex files define Lcom/facebook/jni/Countable;

Sometimes there is a different error but the same type of Multiple dex files define. Would be good to have a solution to get Sonar work with RN based android app.

@passy
Copy link
Member

passy commented Jun 13, 2018

The underlying issue here is probably #41 too, but worth keeping around separately.

@passy
Copy link
Member

passy commented Jun 28, 2018

This should no longer be a thing as we've renamed our version of libfb.so. #24 should take care of the remaining issues.

@passy passy closed this as completed Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants