Vadym
Vadym

Reputation: 163

Android NDK: Application targets deprecated ABI(s): armeabi error after update NDK

Yesterday, after updating NDK I'm having these 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.    

This links directed me to setup-app.mk file on 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 advice?

Upvotes: 9

Views: 17100

Answers (4)

Irshad P I
Irshad P I

Reputation: 2854

If someone still has this issue, here are some things to try in order.

  • Delete build folder, Then Build > Clean Project, Build > Rebuild Project
  • If above doesn't work, add

    APP_ABI:= armeabi-v7a arm64-v8a

    in Application.mk file and link it from the app level gradle (Just like Android.mk is linked to) and try build again

Upvotes: 0

nguyen nam
nguyen nam

Reputation: 51

In Application.mk file, you should set APP_ABI:= armeabi armeabi-v7a x86 mips then sync project. It would solve your problem.

Upvotes: 4

drruggeri
drruggeri

Reputation: 420

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
}

Upvotes: 15

Dan Albert
Dan Albert

Reputation: 10509

Remove armeabi from your APP_ABI list.

As you can see from the source though, it should be a warning, not an error. How are you invoking ndk-build?

Upvotes: 1

Related Questions