简体   繁体   English

忽略ndk-build中的'x86'目标

[英]Ignoring the 'x86' target in ndk-build

I have a large project that builds to all available target architectures (arm, arm7, x86). 我有一个大型项目,可以构建到所有可用的目标架构(arm,arm7,x86)。

This project includes some other modules, some of which cannot be built for x86 (it fails to compile when built for x86). 这个项目包括一些其他模块,其中一些模块不能为x86构建(它在为x86构建时无法编译)。

Can i "ignore" this architecture for the given modules somehow? 我能以某种方式“忽略”给定模块的这种架构吗? (so they will not be built for this arch?) (所以他们不会为这个拱门建造?)

Or what is the best way to overcome this issue? 或者解决这个问题的最佳方法是什么?

The best way to handle different support for architectures is to create different APK for each type. 处理不同体系结构支持的最佳方法是为每种类型创建不同的APK。

http://developer.android.com/google/play/publishing/multiple-apks.html http://developer.android.com/google/play/publishing/multiple-apks.html

Assuming you have a set of Android.mk files, you can check the current architecture with $(TARGET_ARCH) variable. 假设您有一组Android.mk文件,您可以使用$(TARGET_ARCH)变量检查当前架构。 You can use 您可以使用

ifneq ($(TARGET_ARCH),x86)
  include $(BUILD_SHARED_LIBRARY)
endif

... and so on ... 等等

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM