Android NDK: application targets are outdated ABI (s): armeabi error after updating NDK

Yesterday, after updating the NDK, I had the following errors:

Error:(81) Android NDK: Application targets deprecated ABI(s): armeabi Error:(82) Android NDK: Support for these ABIs will be removed in a future NDK release. 

These links directed me to the setup-app.mk file in lines

 _deprecated_abis := $(filter $(NDK_DEPRECATED_ABIS),$(NDK_APP_ABI)) ifneq ($(_deprecated_abis),) $(call __ndk_warning,Application targets deprecated ABI(s): $(_deprecated_abis)) $(call __ndk_warning,Support for these ABIs will be removed in a future NDK release.) endif 

I have no idea how to solve this problem. Any tips?

+9
source share
4 answers

I had the same problem and I just avoided cleaning or restoring the whole project until I received the latest NDK update and the problem arose again.

This is because even after deleting targets, there are still files present in app/.externalNativeBuild that are related to them.

To fix this, I removed Application.mk (which I used to set goals) and added these 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 } 
+15
source

In the Application.mk file, you must set APP_ABI: = armeabi armeabi-v7a x86 mips then synchronize the project. This will solve your problem.

+4
source

Remove the army from the APP_ABI list.

As you can see from the source, this should be a warning, not an error. How do you call ndk-build?

+1
source

If someone still has this problem, here are a few things to try in order.

  • Delete the build folder, then Build> Clear Project, Build> Rebuild Project
  • If the above does not work, add

    APP_ABI: = armeabi-v7a arm64-v8a

    in the Application.mk file and link it to the application level Gradle (just like Android.mk is connected) and try building again

0
source

Source: https://habr.com/ru/post/1273390/


All Articles