Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
372 views
in Technique[技术] by (71.8m points)

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.

question from:https://stackoverflow.com/questions/10098049/android-ndk-build-ignoring-app-abi-x86

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...