Subrata Mallik
Subrata Mallik

Reputation: 97

Release build failed flutter

I am getting the following when trying to build release apk This is the following errors

Execution failed for task ':shared_preferences:verifyReleaseResources'. A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

FAILURE: Build failed with an exception.

Upvotes: 1

Views: 1302

Answers (2)

Talha Javed Khan
Talha Javed Khan

Reputation: 420

try downgrading shared_preferences version

Upvotes: 0

It seems compatibility issue for shared_preferences due to AndroidX incompatibility

You can solve this issue by migrating project to android x

Just perform following steps

Open the Flutter project (Android Folder) into Android Studio

  1. Click on Refactor
  2. Click on Migrate to AndroidX
  3. Wait for process then click on DoRefactor (will appear at the bottom toolbar of Android Studio)

Upvotes: 0

Related Questions