如何检查本机库是否具有64位兼容性 [英] How to check react-native libraries for 64 bit compatibility

查看:117
本文介绍了如何检查本机库是否具有64位兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将我的本机项目升级到0.59.x,以便它可以提供64位版本。

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

我现在需要检查我使用的每个库是否提供64位版本,例如 react-native-firebase 或其他各种流行的库。

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.

我已经解压缩了APK,发现x86_64包含的文件名称与x86目录中的文件相同。我担心的是,因为我的升级路径是如此复杂,并且充满了问题/黑客,并且我使用的是很多的旧库,这些旧库似乎不太可能具有64位版本,因此x86_64中的某些库可能目录实际上可能是32位。

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.

我觉得必须有某种方法,例如以某种方式检查目录中的.so文件。

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

注意:


  • 我知道只有提供本机代码的库才需要提供64位版本。

  • 我假设React Native 0.59.x不能以某种方式保证我的库也被编译为64位。我认为要由我来找到每个库的版本,该库还提供64位版本。如果不是这样,只需升级到0.59.x,确实可以确保我的库被编译为64位,然后告诉我,我的整个问题就可以解决。

  • 我的偏执症源于使用OLD react本机库,然后使用此hack 可以在构建过程中绕过版本不匹配的问题。

  • 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.

推荐答案

查看此问题,阅读讨论中,据此,如果您的任何库都不兼容64位,则不会将其编译为64位。而且构建不会发生!如果您有这种问题。然后,您可以检测到哪个库兼容或不兼容!

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!

通过另一种方式,您可以通过ABI设置true def enableSeparateBuildPerCPUArchitecture = true

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

生成64位版本的apk,并在64位版本的手机或仿真器上签出。

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

这篇关于如何检查本机库是否具有64位兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆