Will the binaries built for ARM work on Intel processors? [Android]

前端 未结 3 1121
不知归路
不知归路 2021-01-13 09:00

Using NDK I built binaries for ARM processor, but due to some dependencies I can\'t build them for x86. Is there any chance to use this binary on x86 or MIPS architecture? <

相关标签:
3条回答
  • 2021-01-13 09:38

    Is there any chance to use this binary on x86 or MIPS architecture?

    I cannot comment on MIPS.

    x86 devices that ship with libhoudini will be able to use your ARM-based NDK binaries. AFAIK, that's most of the current-generation x86 devices, like some of Samsung's tablets. If you ship through the Play Store, libhoudini-equipped devices should be able to download and install your app, without any changes on your end.

    Note, though, that libhoudini runs the ARM binaries much more slowly than it would an x86 binary. This is akin to how the Android emulator runs ARM emulator images much more slowly than it does an x86 emulator image.

    0 讨论(0)
  • 2021-01-13 09:38

    There is absolutely no chance a build for a CPU would be understand by an other.

    The instruction set is different for example, it would be like interpreting a french text ( code ) with an English dictionary ( cpu ).

    0 讨论(0)
  • 2021-01-13 09:42

    Both x86 and MIPs devices are capable of doing ARM binary translation, using Magic Code on MIPs, and Houdini on x86. However, both of these come at a cost, and neither of them are likely to be long term solutions (both companies will likely want them to go away sooner rather than later).

    You mentioned that due to some dependency issues you weren't able to build the lib for x86? Is that still the case? I take it you are using some lib that doesn't include an x86 version?

    For future reference, if you do want to build for x86 native, the process is extremely simple, all you have to do is add APP_ABI+=x86 or add x86 to your existing APP_ABI list.....and....that is it. Really.

    0 讨论(0)
提交回复
热议问题