How is TARGET_ARCH_ABI set in Android.mk
Asked Answered
T

2

8

I am trying to build my native application using ndk-build. Suppose I followed this guide to create my Android project:

https://rathodpratik.wordpress.com/2013/03/24/build-cc-executables-for-android-using-ndk/

When I try to print out my TARGET_ARCH_ABI, I always get armeabi. Even if I explicitly set

  TARGET_ARCH_ABI := armeabi-v7a

The application always builds into the libs/armeabi directory and when I check the elf header, it does in fact show that it has built for ARM.

How can I get it to build for armeabi-v7a?

Tricrotic answered 11/2, 2016 at 19:49 Comment(0)
R
5

Same problem but i actually managed to fix it, i restricted my build.gradle(module) to build only for certain abi, with:

defaultConfig {
  ndk {
    abiFilters 'armeabi-v7a'
  }
}

and Application.mk:

API_ABI := armeabi-v7a
Romalda answered 30/1, 2017 at 17:43 Comment(0)
I
3

I had the exact same problem and I couldn't locate the cause either. However, I fixed it by putting:

TARGET_ARCH_ABI := armeabi-v7a

at the very beginning of Android.mk.

Hope this helps

Insurable answered 18/1, 2017 at 0:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.