Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ndk-build ignoring APP_ABI := x86

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.

like image 293
Code Droid Avatar asked Apr 10 '12 23:04

Code Droid


1 Answers

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

like image 129
Mārtiņš Možeiko Avatar answered Sep 28 '22 08:09

Mārtiņš Možeiko