When I do the following, I get a compiled and signed apk:
- Select Build -> Generate Signed Bundle or APK
- Select APK
- Select my jks file and give the correct passwords etc
- Select Build variant release
Now I want to do the same on the command line (for use in a CI pipeline). I can see from the above output that it is Executing tasks: [:app:assembleRelease]
When I open a terminal and type
gradlew :app:assembleRelease
I get the error
Execution failed for task ':app:compileReleaseJavaWithJavac'. Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_311 contains a valid JDK installation.
I cannot find tools.jar anywhere on my computer.
So the question is: What exactly is the wizard executing when compiling and signing the apk?