Most Android Studio projects use Gradle as the underlying build system, so this section applies to both cases. To enable builds for your native code, add arm64-v8a and/or x86_64, depending on the architectures you want to support, to the ndk.abiFilters setting in your app's 'build.gradle' file:
...
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
...