Error occurred on while build the flutter app

Issue

I am trying to build a flutter app using Android studio with the command : flutter build appbundle --target-platform android-arm,android-arm64,android-x64

But I am getting this error in the Log :

E:\User\Application\flutter_application>flutter build appbundle --target-platf
orm android-arm,android-arm64,android-x64
Running "flutter pub get" in flutter_application...                17.1s

Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.1.1\andr
oid\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.jav
a uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\google_maps_flutter-2.0.
4\android\src\main\java\io\flutter\plugins\googlemaps\Convert.java uses or overr
ides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\google_maps_flutter-2.0.
4\android\src\main\java\io\flutter\plugins\googlemaps\TileProviderController.jav
a uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-1.1.4\andr
oid\src\main\java\io\flutter\plugins\firebase\auth\FlutterFirebaseAuthPlugin.jav
a uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-2.1.0\an
droid\src\main\java\io\flutter\plugins\firebase\firestore\FlutterFirebaseFiresto
rePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-2.1.0\an
droid\src\main\java\io\flutter\plugins\firebase\firestore\streamhandler\Transact
ionStreamHandler.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_storage-8.0.6\android
\src\main\java\io\flutter\plugins\firebase\storage\FlutterFirebaseStoragePlugin.
java:38: warning: [deprecation] Registrar in PluginRegistry has been deprecated
  public static void registerWith(PluginRegistry.Registrar registrar) {
                                                ^
1 warning
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Removed unused resources: Binary resource data reduced from 174KB to 148KB: Remo
ved 14%

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:signReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Wor
kers$ActionFacade
   > Failed to read key key from store "E:\User\Application\flutter_applicatio
n\android\app\key.jks": Integrity check failed: java.security.NoSuchAlgorithmExc
eption: Algorithm HmacPBESHA256 not available

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 13m 46s
Running Gradle task 'bundleRelease'...
Running Gradle task 'bundleRelease'... Done                       834.3s
Gradle task bundleRelease failed with exit code 1

I am using the latest version of flutter 2 also the latest version of android studio, for firebase, I am using it for chat and push notifications.

I tried many solution like running flutter pub get and flutter clean and nothing seems to work, also I tried regenerating jks and re upload google_services.json
Any idea about the solution, please?

Solution

Here is the solution worked for me :

flutter pub cache repair
flutter pub get
flutter clean
flutter build

Answered By – Yasser berrehail

Answer Checked By – Timothy Miller (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *