Android expo build Failed to generate Android Keystore

I’m running expo build:android -t apk and letting expo handle my keys but I’m getting an error on build.

Also an alert from java is triggered, informing me about the JDK (but this is already installed with its latest version). I’m stucked here, please help.

Failed to generate Android Keystore, it will be generated on Expo servers during the build
keytool exited with non-zero code: 1
Error: keytool exited with non-zero code: 1
at ChildProcess.completionListener (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:421:26)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1051:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

at spawnAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
at createKeystore (/@expo/xdl@58.0.3/src/credentials/AndroidCredentials.ts:155:18)
at Object.generateUploadKeystore (/@expo/xdl@58.0.3/src/credentials/AndroidCredentials.ts:198:9)
at UpdateKeystore.provideOrGenerate (/usr/local/lib/node_modules/expo-cli/src/credentials/views/AndroidKeystore.ts:42:53)
at UpdateKeystore.open (/usr/local/lib/node_modules/expo-cli/src/credentials/views/AndroidKeystore.ts:23:22)
at CredentialsManager.run (/usr/local/lib/node_modules/expo-cli/src/credentials/route.ts:41:12)
at runCredentialsManager (/usr/local/lib/node_modules/expo-cli/src/credentials/route.ts:12:10)
at AndroidBuilder.collectAndValidateCredentials (/usr/local/lib/node_modules/expo-cli/src/commands/build/AndroidBuilder.ts:83:7)
at AndroidBuilder.run (/usr/local/lib/node_modules/expo-cli/src/commands/build/AndroidBuilder.ts:33:5)
at AndroidBuilder.command (/usr/local/lib/node_modules/expo-cli/src/commands/build/BaseBuilder.ts:39:7

Expo CLI 3.27.3 environment info:
System:
OS: macOS 10.15.6
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.8.0 - /usr/local/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 6.14.7 - /usr/local/bin/npm
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6626763
Xcode: 11.7/11E801a - /usr/bin/xcodebuild
npmPackages:
expo: ~38.0.8 => 38.0.8
react: ~16.11.0 => 16.11.0
react-dom: ^16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz => 0.62.2
react-native-web: ^0.13.4 => 0.13.4
npmGlobalPackages:
expo-cli: 3.27.3
Expo Workflow: managed

I had a similar error. Solved it after installing the jdk (I’ve noticed you’re saying it is installed - I would recommend reinstalling it. The version I’ve installed that solved the issue is this one - https://www.oracle.com/java/technologies/javase-jdk13-downloads.html)
Hope it helps.

This download solved my problem, thank you so much.