Murtaza Vadnagarwala
Murtaza Vadnagarwala

Reputation: 341

When I try to generate signed bundle or apk I get an error as: Unrecognized native architecture for directory 'lib/arm'

I want to build an APK of release build variant of my app in android studio.

The steps which I follow to build an APK file are as follows:

  1. Build > Generate signed bundle / apk
  2. Android app bundle
  3. Selected key store and added required password for keystore and key
  4. Selected build variant as release

Error: Execution failed for task ':app:packageReleaseBundle'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Unrecognized native architecture for directory 'lib/arm'.

Upvotes: 2

Views: 1419

Answers (2)

Murtaza Vadnagarwala
Murtaza Vadnagarwala

Reputation: 341

I solved this error by updating my app-level build.gradle file. Added following lines:

defaultConfig {
    ....
    ....
    ndk {
        abiFilters 'arm64-v8a', 'x86_64', 'x86', 'armeabi-v7a'
    }
}

And it solved my build issue.

Upvotes: 3

Priyanka Nigam
Priyanka Nigam

Reputation: 14

If there comes some issue While generating APK ,then again generate APK but not with existing path ,choose create new path.You can generate your app APK either in debug or release mode or You can choose both.Then generate APK ,it will surely work.

Upvotes: -1

Related Questions