I've released latest version of application to production on Play Store.
Below are the logs from logcat while running the app downloaded from Play Store in Android Studio Simulator. There are a couple errors in the end where the execution stops. It seems that the error is shown whenever it is not able to find a native dependency in any of the predetermined locations.
Even while running the APK, I get the same logs but the execution continues and finishes to launch the application and fetch data from the server.
> 2020-08-17 22:39:02.997 4719-4719/? D/SoLoader: libyoga.so not found on /data/data/com.abc.testapp/lib-main
> 2020-08-17 22:39:02.997 4719-4719/? D/SoLoader: libyoga.so not found on /data/data/com.abc.testapp/lib-0
> 2020-08-17 22:39:02.997 4719-4719/? D/SoLoader: libyoga.so found on /data/data/com.abc.testapp/lib-1
> 2020-08-17 22:39:03.002 4719-4719/? D/SoLoader: libjsinspector.so not found on /data/data/com.abc.testapp/lib-main
> 2020-08-17 22:39:03.002 4719-4719/? D/SoLoader: libjsinspector.so not found on /data/data/com.abc.testapp/lib-0
> 2020-08-17 22:39:03.002 4719-4719/? D/SoLoader: libjsinspector.so found on /data/data/com.abc.testapp/lib-1
> 2020-08-17 22:39:03.003 4719-4719/? D/SoLoader: libfolly_json.so not found on /data/data/com.abc.testapp/lib-main
> 2020-08-17 22:39:03.003 4719-4719/? D/SoLoader: libfolly_json.so not found on /data/data/com.abc.testapp/lib-0
> 2020-08-17 22:39:03.003 4719-4719/? D/SoLoader: libfolly_json.so found on /data/data/com.abc.testapp/lib-1
> 2020-08-17 22:39:03.011 4719-4719/? D/SoLoader: libjsc.so not found on /data/data/com.abc.testapp/lib-main
> 2020-08-17 22:39:03.011 4719-4719/? D/SoLoader: libjsc.so not found on /data/data/com.abc.testapp/lib-0
> 2020-08-17 22:39:03.011 4719-4719/? D/SoLoader: libjsc.so not found on /data/data/com.abc.testapp/lib-1
> 2020-08-17 22:39:03.011 4719-4719/? D/SoLoader: libjsc.so not found on /data/data/com.abc.testapp/lib-2
> 2020-08-17 22:39:03.011 4719-4719/? D/SoLoader: libjsc.so not found on /data/app/com.abc.testapp-ue_qPUdXT8TbbZBF3aKjsA==/lib/x86
> 2020-08-17 22:39:02.977 4719-4719/? W/abc.testapp: type=1400 audit(0.0:559): avc: granted { execute } for path="/data/data/com.abc.testapp/lib-1/libfb.so" dev="vdc" ino=147513 scontext=u:r:untrusted_app_27:s0:c146,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c146,c256,c512,c768 tclass=file
> 2020-08-17 22:39:02.977 4719-4719/? W/abc.testapp: type=1400 audit(0.0:560): avc: granted { execute } for path="/data/data/com.abc.testapp/lib-1/libglog.so" dev="vdc" ino=147516 scontext=u:r:untrusted_app_27:s0:c146,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c146,c256,c512,c768 tclass=file
> 2020-08-17 22:39:02.977 4719-4719/? W/abc.testapp: type=1400 audit(0.0:561): avc: granted { execute } for path="/data/data/com.abc.testapp/lib-1/libglog_init.so" dev="vdc" ino=147518 scontext=u:r:untrusted_app_27:s0:c146,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c146,c256,c512,c768 tclass=file
> 2020-08-17 22:39:03.381 1814-1814/? E/Layer: [Surface(name=AppWindowToken{ab7a8d4 token=Token{81bde27 ActivityRecord{9318e6 u0 com.abc.testapp/.MainActivity t205}}})/@0x356d6b1 - animation-leash#0] No local sync point found
> 2020-08-17 22:39:03.381 1814-1814/? E/Layer: [Surface(name=AppWindowToken{ab7a8d4 token=Token{81bde27 ActivityRecord{9318e6 u0 com.abc.testapp/.MainActivity t205}}})/@0x356d6b1 - animation-leash#0] No local sync point found
Fixing the error shown above
I've tried following this answer https://stackoverflow.com/a/56778060/12246335 but it started producing APK with sizes twice as before and app kept crashing.
This answer https://stackoverflow.com/a/59626013/12246335 suggests enabling cleartext traffic. I went through the docs but couldn't see how this would be useful, also it mentioned security issues upon adding this option.
The configuration in AndroidManifest.xml shows that currently the cleartext traffic is enabled for debug mode and not for release mode.
Updating gradle and gradle plugin version
Any help/suggestion is appreciated. Thank you.
I've found the fix.
Turns out the issue was with Hermes being enabled.
https://github.com/facebook/react-native/issues/26400#issuecomment-539395814
The above answer fixed it for me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.