Error Building Aab - Flutter (android) - Integrity Check Failed: Java.security.nosuchalgorithmexception: Algorithm Hmacpbesha256 Not Available
Solution 1:
I was getting the same error, I try this command
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload -storetype JKS
with extra attribute
-storetype JKS
it helps me to solve my problem and successfully create bundle.
The -storetype JKS tag is only required for Java 9 or newer. As of the Java 9 release, the keystore type defaults to PKS12.
Solution 2:
It turns out i was generating my signing key using a different Java Version than my app was using to build the app. You can check this by running flutter doctor -v and seeing where the Java binary is located, and comparing it to when you run "which java".
The solution is to run your keygen command prefixed with the location of the Java bin found in the flutter doctor output like so:
/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/bin/keytool -genkey -v -keystore ~/pc-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias pckey
Solution 3:
It solves me when I remove debug.keystore from the bellow directory.
/Users/tariqul/.android/debug.keystore
Solution 4:
Note: The keytool command might not be in your path—it’s part of Java, which is installed as part of Android Studio. For the concrete path, run flutter doctor -v and locate the path printed after ‘Java binary at:’. Then use that fully qualified path replacing java (at the end) with keytool. If your path includes space-separated names, such as Program Files, use platform-appropriate notation for the names. For example, on Mac/Linux use Program\ Files, and on Windows use "Program Files". The -storetype JKS tag is only required for Java 9 or newer. As of the Java 9 release, the keystore type defaults to PKS12
1- remove upload-keystore.jks
a- /android/app/upload-keystore.jks
b- /home/user/upload-keystore.jks
2- Regenerate file :
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload -storetype JKS
3- copy file /home/user/upload-keystore.jks to android/app/
4- flutter clean
5- Flutter build appbundle
Solution 5:
in android folder in app folder open build.gradle and make sure to keep
(buildTypes { release { signingConfig signingConfigs.debug } })
and before prepare app bundle change it to (signingConfig signingConfigs.release)
Post a Comment for "Error Building Aab - Flutter (android) - Integrity Check Failed: Java.security.nosuchalgorithmexception: Algorithm Hmacpbesha256 Not Available"