You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react native native library libgnustl_shared.so only 661KB, But when I use a thirdparty sdk, it also has a libgnustl_shared.so , and It will show this error
Path in archive: lib/armeabi-v7a/libgnustl_shared.so Origin 1: /Users/hezhe/PaintMall/android/app/build/intermediates/exploded-aar/com.facebook.react/react-native/0.24.0-rc3/jni/armeabi-v7a/libgnustl_shared.so Origin 2: /Users/hezhe/PaintMall/android/app/src/main/jniLibs/armeabi-v7a/libgnustl_shared.so You can ignore those files in your build.gradle: android { packagingOptions { exclude 'lib/armeabi-v7a/libgnustl_shared.so' } }
So I delete the thirdparty 's libgnustl_shared.so ,but its libgnustl_shared.so is 714KB , I think the two .so file are not the same, so It showed this error:
08-14 15:05:12.963 16877-16877/com.paintmall E/art: dlopen("/data/app/com.paintmall-1/lib/arm/libqupai-media-jni.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "_ZSt24__throw_out_of_range_fmtPKcz" referenced by "libqupai-media-jni.so"...
But I'm not sure ,so I copy the react native's libgnustl_shared.so to replace the thirdparty demo's
libgnustl_shared.so and it showed the same error, now I confirmed that issue. I must use this thirdparty sdk ,what should I do ? Do I build react native from source can solve this problem?
If yes, how ? thanks :) I'm in hurry ~~~ bacause this thirdparty does the most important job in our app ....Without that,our app can't be submited
Rebuild your APK by excluding gcc-4.8's libgnustl_shared.so (i.e., the smaller one) and keeping the one from gcc-4.9. I highly doubt that this would work though..
Rebuild ReactAndroid in gcc-4.8 but link against gnustl statically.
Rebuild ReactAndroid in gcc-4.9.
Ask qupaicloud's developers to send you a special build of libqupai-media-jni.so built with gcc-4.8.
@overminder do know you what it takes to link against gnustl statically? Even if one dev (qupaicloud) does a special favor and makes a custom build, most devs will not be so nice.
This will in the long term lead to dependency hell and this problem is probably outside the domain for most JavaScript or even Android developers. If it takes to make changes Application.mk & Android.mk files, do you know how to proceed?
Activity
overminder commentedon Aug 18, 2016
This symbol comes from gcc-4.9's libgnustl_shared.so while ReactAndroid is built with gcc-4.8.
You have four choices:
libgnustl_shared.so(i.e., the smaller one) and keeping the one from gcc-4.9. I highly doubt that this would work though..gnustlstatically.libqupai-media-jni.sobuilt with gcc-4.8.hey99xx commentedon Dec 7, 2016
@overminder do know you what it takes to link against
gnustlstatically? Even if one dev (qupaicloud) does a special favor and makes a custom build, most devs will not be so nice.This will in the long term lead to dependency hell and this problem is probably outside the domain for most JavaScript or even Android developers. If it takes to make changes
Application.mk&Android.mkfiles, do you know how to proceed?hramos commentedon May 25, 2017
Closing this issue because it has been inactive for a while. If you think it should still be opened let us know why.