Android NDK: Application targets deprecated ABI(s): armeabi error after update NDK
I had the same problem and was just avoiding cleaning or rebuilding the whole project until I got the latest NDK update and the problem re-emerged.
This happens because even after removing the targets, there are still files present in app/.externalNativeBuild
that refers to them.
To fix this I removed the Application.mk (which I was using to set the targets) and added this lines to app/build.gradle
android {
defaultConfig {
// ...
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a' // 'x86', 'x86_64' may be added
}
}
// ...
task ndkClean(type: Delete) {
// remove unused archs from build cache
delete fileTree('.externalNativeBuild') {
exclude defaultConfig.ndk.abiFilters.collect { '**/' + it }
}
}
tasks.findByPath(':clean').dependsOn ndkClean
}
In Application.mk file, you should set APP_ABI:= armeabi armeabi-v7a x86 mips then sync project. It would solve your problem.