cant build android apk error: CommandInvokationFailure: Failed to sign APK package

i am trying to build a test for my app. when i build the app i get the following error

    CommandInvokationFailure: Failed to sign APK package.
    C:\Program Files (x86)\Android\android-sdk\build-tools\26.0.2\apksigner.bat sign --ks "D:/Programming/UnityProjects/MobileProject-resortTycoon/user.keystore" --ks-pass stdin  --ks-key-alias "test123" --key-pass stdin  "D:\Programming\UnityProjects\MobileProject-resortTycoon\Temp/StagingArea/Package.apk"
    
    stderr[
    Error: keywords 'java|openjdk version' not found in 'picked up java_tool_options: -df'
    Error: keywords 'java|openjdk version' not found in 'picked up java_tool_options: -df'
    Failed to load signer "signer #1"
    java.io.IOException: Invalid keystore format
    	at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:658)
    	at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
    	at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
    	at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
    	at java.security.KeyStore.load(KeyStore.java:1445)
    	at com.android.apksigner.ApkSignerTool$SignerParams.loadKeyStoreFromFile(ApkSignerTool.java:829)
    	at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCertsFromKeyStore(ApkSignerTool.java:719)
    	at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCerts(ApkSignerTool.java:659)
    	at com.android.apksigner.ApkSignerTool$SignerParams.access$500(ApkSignerTool.java:611)
    	at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:266)
    	at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89)
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    ]
    stdout[
    Keystore password for signer #1: 
    ]
    exit code: 2
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.Command.RunWithStdin (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg, System.String[] input)
    UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg, System.String[] stdin)
    UnityEditor.Android.PostProcessor.Tasks.BuildAPK.SignPackage (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.Tasks.BuildAPK.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

i already tried reinstalling the android sdk and updating it to latest version, downloading different android versions, using the new gradle instead of internal. nothing worked.
after an hour of searching for a solution i still dont know how to fix this.
can someone help me?
thanks alot!

Hi @kelvin-w Unity version of 2017 or later are only compatible with SDK 25.2.5 and JDK 1.8.161 (I think). So change your SDK → Tools with 25.2.5 version. If you don’t want to overwrite your tools folder you can rename it to something else. Here is my SDK and JDK you can download and add it to the Unity → Preferences → External Build https://drive.google.com/drive/folders/16n3hvR9JfTaKWW0MGNDhHLc6XIg3agM9?usp=sharing

hope it works on you. Insya Allah. Regards, Ikhsan Syahputra.

no one? cant anyone help me?