Question: 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?

Answer: 
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

```
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