Android ndk-build ignoring APP_ABI := x86

android, android-ndk

Solution

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

Problem

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 only x86 for APP_ABI. And the file size is always the same. here is my Application.mk file: ``` LOCAL_PATH := $(call my-dir) APP_ABI := x86 include $(CLEAR_VARS) LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog LOCAL_MODULE := myjni-jni LOCAL_SRC_FILES := myjni-jni.c include $(BUILD_SHARED_LIBRARY) ``` No Matter what I put after APP_ABI I am getting armeabi and its always same size. Whats wrong here? I am using latest NDK.

Original source