I have upgraded my react-native project to 0.59.x so that it may provide a 64 bit version.

I now need to check whether each library I use provides a 64 bit version, such as react-native-firebase or various other popular libraries.

I've already decompressed the APK and observed that x86_64 contains files with the same names as in the x86 directory. My concern is that because my upgrade path was so complex and fraught with issues/hacks, and I'm using very old libraries which seem less likely to have 64bit versions, that perhaps some of those libraries within x86_64 directory might actually be 32 bit.

I feel like there must be some way, such as inspecting the .so files within the directory some way.

NOTE:

  • I understand that only libraries which provide native code will need to provide 64 bit version.
  • I assume React Native 0.59.x does not somehow guarantee my libraries are compiled to 64 bit also. I assume it's up to me to find a version of each library which also provides 64 bit version. If this is not true, and simply upgrading to 0.59.x does somehow guarantee my libraries are compiled to 64 bit, then tell me that and my entire question itself is solved. This seems extremely unlikely though.
  • My paranoia stems from using OLD react native libraries and then using this hack to bypass version mismatch issues during build.
Answer

Check out this issue, read the discussions, according to this if your any library is not 64 bit compatible it won't be compiled into 64 bit. And build won't be happening! If you have that kind of problem. Then you can detect which library is compatible or not!

In another way, you can do the split by ABI setting true def enableSeparateBuildPerCPUArchitecture = true

Produce the 64-bit version apks and check it out on 64 -bit version phone or emulator.

  • 1
Reply Report
    • In that issue, the failure is at runtime not compile time. An APK containing 64bit binaries is loaded onto a 32 bit phone. Youre clearly putting a lot of time into trying to help me, so I apologize, it appears that isn't helpful :( You also suggest trying to run my APK on a 64 bit device and if it fails, then the libraries aren't 64bit. This seems obvious to me and it's what I'm hoping to avoid. I'm not aware of any 64bit-only devices, most that are 64bit also support 32, so I'm not sure how to accomplish that. Your suggestion about enableSeparateBuildPerCPUArchitecture is great though!

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags

Related Questions