Keytool command doesn't executed properly
Checklist:
- [x] I am using the latest release
- [x] I searched for existing GitHub issues
- [x] I read the documentation
- [x] I verified the client configuration matches the information in the identity provider (or I am using dynamic client registration)
- [x] I am either using a custom URI scheme or
httpswith App Links for client redirect. - [ ] I can reproduce the issue in master branch
Configuration
- Version: actual master on 23.09.22
- Integration: (native(Java/Kotlin), Xamarin, ReactNative, etc)
- Identity provider: (Google, Okta, Gluu, Auth0, KeyCloack, etc)
Issue Description
appauth.keystore missing - creating one The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java.
FAILURE: Build failed with an exception.
-
Where: Script '/Users/XXXXX/Documents/AndroidProjects/AppAuth-Android/config/keystore.gradle' line: 4
-
What went wrong: A problem occurred evaluating root project 'AppAuth-Android'.
Process 'command 'keytool'' finished with non-zero exit value 1
P.S. JAVA_HOME set properly
in my ~/.bash_profile
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/Contents/Home/
as I understood problem could be on my mac, but I could not find it.
P.S. easy decision for not be stuck
- Add this link to get full path where
appauth.keystoreshould beprintln "### $keystoreFile" - open terminal, and go to the path in previous step for me it was -
/Users/XXXXX/Documents/AndroidProjects/AppAuth-Android/config/keystore.gradle - just call
keytool -genkey -keystore appauth.keystore -alias appauth -keyalg RSA -keysize 2048 -validity 10000 -keypass appauth -storepass appauth -dname CN=appauth
Hello. It might be a bit late but in case anyone will have the same issue - make sure to add JAVA_HOME to your PATH variable:
export PATH="$JAVA_HOME/bin:$PATH"
This worked for me.