Android build error cant find keystore

I’m getting an error when packaging my build for android. attached is there error. any help would be lovely

FAILURE: Build failed with an exception.

* Where:
Build file 'E:\work stuff\gremm studios stuff\game\GretasPawUnity\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':launcher'.
> Failed to apply plugin 'com.android.internal.application'.
   > org.gradle.api.InvalidUserDataException: Failed to get default debug keystore location.

* 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 1s



CommandInvokationFailure: Gradle build failed. 
C:\Program Files\Unity\Hub\Editor\2022.3.38f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2022.3.38f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.5.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

Environment Variables:
PROCESSOR_ARCHITECTURE = AMD64
AMPLITUDE_API_KEY_YELLOWBUCKET_DEV = 48835b4d1f5e342aefe5f016324d296a
ANDROID_NDK_ROOT = C:\Program Files\Unity\Hub\Editor\2022.3.38f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
DriverData = C:\Windows\System32\Drivers\DriverData
USERDOMAIN = KYLES-BIGPC
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
COMPUTERNAME = KYLES-BIGPC
DEBUG_ENV_VAR = UnityHub
LOGONSERVER = \\KYLES-BIGPC
AMPLITUDE_TOKEN_GREENBUCKET_PROD = ZpUcbAdZXJYzNSoHsAWtL_s_JppwWid9
NDK_ROOT = C:\Users\Kyle\AppData\Local\Android\Sdk\ndk\25.1.8937393
PUBLIC = C:\Users\Public
ProgramData = C:\ProgramData
SESSIONNAME = Console
AMPLITUDE_TOKEN_YELLOWBUCKET_PROD = UYDQtPOw83dIfVy3SrW5oMyo7ru4PRkV
RlsSvcPort = 22112
ANDROID_HOME = C:\Users\Kyle\AppData\Local\Android\Sdk
APPDATA = C:\Users\Kyle\AppData\Roaming
SystemRoot = C:\WINDOWS
windir = C:\WINDOWS
AMPLITUDE_API_KEY_REDBUCKET_DEV = 46b8b46515e7632fc42a504b72e05fd0
ProgramFiles(x86) = C:\Program Files (x86)
ProgramW6432 = C:\Program Files
EFC_11700 = 1
OS = Windows_NT
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
HOMEPATH = \Users\Kyle
AMPLITUDE_TOKEN_REDBUCKET_DEV = U4PSN7S7PuYVRODivvdcFwbu8R6IHGqa
ACSetupSvcPort = 23210
CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_31240_SEVOPUWFTVYRCRBV
PROCESSOR_LEVEL = 6
NDKROOT = C:\Users\Kyle\AppData\Local\Android\Sdk\ndk\25.1.8937393
CommonProgramFiles = C:\Program Files\Common Files
JAVA_HOME = C:\Program Files\Unity\Hub\Editor\2022.3.38f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
USERDOMAIN_ROAMINGPROFILE = KYLES-BIGPC
TEMP = C:\Users\Kyle\AppData\Local\Temp
CommonProgramW6432 = C:\Program Files\Common Files
AMPLITUDE_TOKEN_YELLOWBUCKET_DEV = wKi8foVigDditGFvmZewRFWsEbX9Y0YO
AMPLITUDE_API_KEY_GREENBUCKET_DEV = 3ded2a762163603391a425f688f990c8
AMPLITUDE_API_KEY_REDBUCKET_PROD = ca12bb461ea96f9bdf5df4ded7d52994
HOMEDRIVE = C:
AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
USERNAME = Kyle
OneDrive = C:\Users\Kyle\OneDrive
AMPLITUDE_API_KEY_YELLOWBUCKET_PROD = e03a9bbe92dc38a88cdb068d24c65b46
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
AMPLITUDE_TOKEN_REDBUCKET_PROD = jTIgKs5KTZOjiqEEVdZFbgo_VRhABduL
NUMBER_OF_PROCESSORS = 6
GTK_BASEPATH = C:\Program Files (x86)\GtkSharp\2.12\
AMPLITUDE_TOKEN_GREENBUCKET_DEV = 84H2gMm_FJzhr3mBaX1lM1JVukmCM7d9
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_DEV = client-wbjHYrmeSR87GmWOE7LDpf7sUySOIKHm
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
AMPLITUDE_API_KEY_GREENBUCKET_PROD = c86fea37a9e1d3f0878b96e15b111c7c
ComSpec = C:\WINDOWS\system32\cmd.exe
EnableLog = WARNING
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
ANDROID_SDK_HOME = C:\Users\Kyle\AppData\Local\Android\Sdk
PROCESSOR_REVISION = 9e0a
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_PROD = client-zH8Y7OK1i331EKuG77C6UxN8ygcM6LzS
TMP = C:\Users\Kyle\AppData\Local\Temp
SystemDrive = C:
AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
ACSvcPort = 17532
OneDriveConsumer = C:\Users\Kyle\OneDrive
SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
ALLUSERSPROFILE = C:\ProgramData
Path = C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\java8path;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\Kyle\AppData\Local\Microsoft\WindowsApps;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Perforce\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA app\NvDLISR;C:\Users\Kyle\AppData\Local\Microsoft\WindowsApps;C:\Users\Kyle\AppData\Local\Android\Sdk\platform-tools;C:\Users\Kyle\AppData\Local\Android\Sdk\tools;C:\Users\Kyle\.dotnet\tools;
ProgramFiles = C:\Program Files
LOCALAPPDATA = C:\Users\Kyle\AppData\Local
USERPROFILE = C:\Users\Kyle
WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3


stderr[

FAILURE: Build failed with an exception.

* Where:
Build file 'E:\work stuff\gremm studios stuff\game\GretasPawUnity\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':launcher'.
> Failed to apply plugin 'com.android.internal.application'.
   > org.gradle.api.InvalidUserDataException: Failed to get default debug keystore location.

* 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 1s
]
stdout[

]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <2fb5bcd8e6024287bf092a8fc109e39b>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <2fb5bcd8e6024287bf092a8fc109e39b>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <2fb5bcd8e6024287bf092a8fc109e39b>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <2fb5bcd8e6024287bf092a8fc109e39b>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <2fb5bcd8e6024287bf092a8fc109e39b>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <2fb5bcd8e6024287bf092a8fc109e39b>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2fb5bcd8e6024287bf092a8fc109e39b>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2fb5bcd8e6024287bf092a8fc109e39b>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Is your keystore missing?
Did you add a keystore to your Publishing Settings? If not, you can create one under:
Edit → Project Settings → Player → Publishing Settings
look here

Enable “Custom Keystore” and use the Keystore Manager to create a key and place it inside your project. Keep the passwords somewhere save. You have to type it in everytime, if you restarted Unity, before you start a build.

Yes i did. And i even readded it.

Error mentions debug keystore. Try removing “C:\Users\username\.android\debug.keystore”, Unity would recreate it on next launch.

Tried that. It did not recreat it at all. Still gave the same error. And then when i restored thr files it said same thing.

Did you restart Unity after deleting keystore?
If that doesn’t help - open android studio and try to build. That should create debug.keystore as well

Yes i did. And how would i do that on android studio?

Any other ideas?