Upgrade to 0.59 React native problem when dont have exclude in packagingOptions
Asked Answered
D

2

6

I have upgraded to 0.59.3 react native using the rn-diff-purge method. According to that, in the app.gradle file, i need to add the following:

packagingOptions {
exclude "lib/arm64-v8a/libgnustl_shared.so"
exclude '/lib/mips64/**'
exclude '/lib/arm64-v8a/**'
exclude '/lib/x86_64/**'
}

This will cause the 64bit folders not generated in my apk. Therefore when i upload to google, it complains about this apk not compatible with 64bit environment.

However, if i were to remove the packagingOptions config, the 64 bit folder will be generated and i'm able to upload to google successfully but in my device, I'm trying out with Android version 7.1.1(nougat) it will crash. Can anyone help?

Derk answered 18/7, 2019 at 23:49 Comment(2)
What version of react-native are you upgrading from? Because in the 0.59.3 version of react-native the app/build.gradle does not have packagingOptions as far as I can see. github.com/react-native-community/rn-diff-purge/blob/release/…Monandry
Check the library 'react-native-elements'. I have received some errors reports from that library when you compile the app for x64. Try to remove where you are using and check if is that. Then try to update it if they has been fixed the error or use a older version like I do. My version with no problem is: "react-native-elements": "^0.17.0",Ackley
V
0

As you can see here and above, there are several improvements to fix the crash on some devices (especially Samsung Galaxy S7). Simply upgrade to RN 0.59.10 which describes as below:

it contains an important Android side update for the JavaScript Core, to prevent a great number of crashes mostly related to Samsung devices.

You can use this link to upgrade

Vociferance answered 24/7, 2019 at 10:42 Comment(1)
thanks for the link. I did exactly as what the link suggested but still crashes when it install on my phoneDerk
N
0

Google has instructed developers of apps with native libs (.so files) to start supporting 64 bit architectures as it is about to force 64 bit support for apps having ndk libs. That's why Google play console was giving you warnings when you tried to upload just 32 bit supported build.

Now, coming to your issue with reach native, I would recommend updating to the latest react native release to rule out any issue in the react native libs itself.

Nock answered 26/7, 2019 at 12:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.