I'm going through the documentations Oculus Quest 2 Native-MobileSDK-Getting Started-Android Studio Basics, and I'm stuck with the following Android Studio error:
Execution failed for task ':VrSamples:VrCubeWorld_Framework:Projects:Android:validateSigningDebug'.
> Keystore file 'C:\Users\thisUser\Downloads\OculusMobileSDK\VrSamples\VrCubeWorld_Framework\Projects\Android\android.debug.keystore' not found for signing config 'debug'.
The tutorial says nothing about how to get this "android.debug.keystore" file.
I've read the Quest 2 Android Application Signing page, but these steps create a .jks file not a .keystore file. I tried renaming the ".jks" file to "android.debug.keystore" and placing it in the correct directory, but I get a "failed to decrypt" error.
I've asked for help on Oculus support page and Oculus forums, but no one has been of help.
Can someone please help me with this issue? I am new to Android developement.
CodePudding user response:
Finally got the code to run. Here's what I did:
Install Jave SE Development Kit 17.0.1.
Open Command Prompt and enter the following:
cd C:\Program Files\Java\jdk-17.0.1\bin
keytool.exe -genkey -v -keystore android.debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
The file android.debug.keystore will be created in the directory cd C:\Program Files\Java\jdk-17.0.1\bin. Move android.debug.keystore file to the appropriate directory. For me, it was *C:\Users\thisUser\Downloads\OculusMobileSDK\VrSamples\VrCubeWorld_Framework\Projects\Android*
In Android Studio, go to File-Settings-Build,Execution,Deployment-Build Tools-Gradle. In Gradle settings, change Gradle JDK to version 15. For me, I had to download and use corretto-15 Amazon version.