Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NDK: how to build a lib, so that app can work on arm(s), x86, etc.?

I never used c++ for android and NDK before. When I use it for - say - image processing I want to be sure app will work on all devices with android 2.2 and higher.

When I write for iPhone, xcode compiles 2 binaries for arm7 and arm7s architectures and packs them into the same bundle.

Now I've written a sample NDK app which doesn't want to run on x86 android emulator while running well on my Nexus 7. I think it's obvious that should be the way to make it run both on arm and x86, but still can't find it. Does somebody know? Thanks!

like image 641
Tertium Avatar asked May 15 '13 11:05

Tertium


1 Answers

You need just add to Application.mk this string:

APP_ABI := all
like image 74
Tertium Avatar answered Sep 19 '22 12:09

Tertium