Android ndk-build ignoring APP_ABI := x86

后端 未结 3 1929
抹茶落季
抹茶落季 2020-12-09 01:31

I\'m trying to run NDK to compile native code to run on Atom(x86) processor as well as ARM. No matter how I set APP_ABI, NDK is generating armeabi library. Even if I put o

相关标签:
3条回答
  • 2020-12-09 01:54

    You should put APP_ABI variable in Application.mk file not Android.mk file.

    It's written in documentation of NDK (docs/CPU-ARCH-ABIS.html file).

    0 讨论(0)
  • 2020-12-09 01:57

    If you don't have an Application.mk file, create one inside jni folder under project root.

    project_root/jni/Application.mk

    Add target compile platform to it:

    APP_ABI := x86

    Or platforms:

    APP_ABI := armeabi armeabi-v7a x86 mips

    0 讨论(0)
  • 2020-12-09 02:02

    Also you can set APP_ABI directly to ndk-build shell command:

    ndk-build APP_ABI=x86
    
    0 讨论(0)
提交回复
热议问题