android - Errors while building APK: Algorithm HmacPBESHA256 not available - TagMerge
5Errors while building APK: Algorithm HmacPBESHA256 not availableErrors while building APK: Algorithm HmacPBESHA256 not available

Errors while building APK: Algorithm HmacPBESHA256 not available

Asked 10 months ago
2
5 answers

The problem occurs due to Missing Java Environment variable or mismatch between Android jdk and already set java environment variable version. To solve this set jdk to environment variable version.

Source: link

1

Make sure JDK is installed.

File -> Project Structure -> SDK Location -> Gradle Settings -> change the gradle JDK to the correct one.

Source: link

0

i also experienced the same thing, but when i change JDK to 16 it managed to debugenter image description here

and it worked when changing my jdk

enter image description here

Source: link

0

I had to reinstall JDK to meet with this patch changes, but found out android studio by default uses its own and seems is limited with jre-11 (at the latest Android Studio release). When I point out my system jdk (openjdk-17) it shows different issues where the latest one is:
Unsupported class file major version 61
or
KaptContext (in unnamed module @0x1d84e47) cannot access class com.sun.tools.javac.util.Context
and when I build with android studio bundled jdk I got the same issue with lack of crypto alg.
Execution failed for task ':app:signBetaReleaseBundle'.

Source: link

0

Therefore the following error happens when running flutter build appbundle.
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.Workers$ActionFacade
   > Failed to read key upload from store "/Users/ronli/upload-keystore.jks": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available
@Alhaadi-IDB Interesting because java 11 didn't have that algorithm. Can you provide more details? What's the output of this command on your machine?
/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/bin/java --version
@Alhaadi-IDB Interesting because java 11 didn't have that algorithm. Can you provide more details? What's the output of this command on your machine?
/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/bin/java --version
If you are still facing this issue, Update Android Studio IDE to the latest version 4.2 and regenerate the jks file again then build your apk or appbundle. and the issue will not appear again. Steps to update Android Studio In the main page of Android Studio go to this path
Configure/Preferences/Appearance & Behavior/System Settings/Updates
@Alhaadi-IDB Interesting because java 11 didn't have that algorithm. Can you provide more details? What's the output of this command on your machine?
/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/bin/java --version

Source: link

Recent Questions on android

    Programming Languages