-
Notifications
You must be signed in to change notification settings - Fork 585
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
App crashing with proguard enabled in react-native 0.57.X - couldn't find DSO to load: librealmreact.so #1960
Comments
Please try to unzip your I have tried to enable Proguard on a small app, and the |
in soLoader lib changed api method signature Solution is downgrade the Fresco and soLoader libs versions. |
@OleksandrKucherenko Thanks for the suggestions. |
@OleksandrKucherenko hello. I have these versions
android/app/build.gradle
apk contains 2 files but it doesn't help to solve issue
|
2 @serjiogunit : it sounds like Just use Android Studio feature ' analyze APK..." and check that inside the final binary librealmreact.so file exists. Also, analyze how proguard rename the classes, are they included into first DEX file or into second/third one. next step is to validate which ABI used on the device... x64 vs x86, etc. next step is to try to follow - facebook/fresco#2049 (comment) |
I still have same issue with
(there is only But the error says:
Can be wrong path somehow? Any ideas? |
Also experiencing the same issue with Realm 2.21.1 and React Native 0.57.8 when compiling with proguard. |
I wonder if somebody tried this with R8 (that should deprecate proguard) ? New code shrinkerR8 is a new tool for code shrinking and obfuscation that replaces ProGuard. You can start using the preview version of R8 by including the following in your project’s gradle.properties file: android.enableR8 = true |
I'll have a lookie, see if anything changes. |
@ferrannp It says |
Another suggestion might be that it could be related to App Bundles if you are shipping your app using that? Realm Java had a bug that could look similar to what you are seeing: realm/realm-java#5977 |
Pretty much got the app to split with these filters -> "armeabi-v7a", "x86" |
Yes I got the two splits two:
Without proguard is fine. It does not matter if you split or not, the resulted |
Would be nice to see a fix for this as we can't upgrade without disabling proguard. |
It might be a good time to switch to ReLinker. |
@ferrannp Same issue here. Any solutions? |
Hi, I add "-keep class io.realm.react.**" into the file proguard-rules.pro. Now it runs well |
Sadly that doesn't help :/ |
@8BallBomBom |
Very close to what i'm running. |
So I updated realm to
And I only had to add one line to my
@adyanced your .apk will be smaller just with that line instead of the whole @kneth did anything change that this is fixed? Anyway we can avoid extra line in proguard file? (or should be documented or added to the realm proguard itself?). |
@ferrannp I think #2177 might have helped. @cmelchior Do you know if we can get rid of that proguard line? |
Any update on this? |
Any update on this ?
|
@reachtokish We currently don't support 64 bit. You need to include 32 bit only. See for example #2221 (comment) |
react-native : "0.59.3" |
I will close this issue because it is creating confusion. Realm works with proguard (see comments), what it does not work is 64bits yet. |
Sorry i didn't get back but yes the issue i had was resolved by upgrading React Native and running clean builds. |
If only |
Simplest way to find the issue is, create an apk with debuggable enabled & run it over device while connected to android studio & check logcat, in there you will see which package/lib exactly you need to add in -keep. |
Goals
Trying to build a production ready apk (Android).
Actual Results
App crashes if proguard is enabled (
def enableProguardInReleaseBuilds = true
).It crashes no matter if you split in several apks or only one.
This is my proguard config:
Version of Realm and Tooling
The text was updated successfully, but these errors were encountered: