I wanted to go for option 2 because I’d rather not have to touch my gradle file. So I uploaded the keystore to BitRise, set the password etc, changed the default Gradle Runner to assembleRelease, and added a sign-apk workflow step after the gradle runner.
I get an error telling me it can’t find a keystore so the build fails. What do you think I’m doing wrong here?
–
I then tried option 1 and modified my build.gradle with a new signing config:
Na’, first steps are always hard but you’ll get into it in no time, don’t worry!
I’d suggest as well if you’re getting started.
Sounds good
I’d suggest you to revert that change, it’s not required if you go with option 2. Let’s stick with Option 2, using the Sign APK step
Could you please copy paste the related build’s bitrise.io URL? Sounds like a minor misconfiguration - with the URL I can check the logs & the config the build ran with
Thanks Viktor! Here is the most recent build. Correct me if I’m wrong but does the gradle task assembleRelease not just attempt to create a signed apk in one step (using whatever environment variables are in the gradle)? In which case I need to create an unsigned apk first I guess and somehow pass it to the sign-apk task.
If it makes any difference my assemble task is actually a build variant: assembleRelease_slim, but I don’t think that matters.
It seems we would need a little more information to investigate. Could you please send us a build URL where this issue happens and enable Support Access on the Settings tab of the app (https://devcenter.bitrise.io/troubleshooting/enabling-bitrise-support-user/ )? This way we can check things out better on our end. If you are not comfortable sharing your build here, please feel free to submit a support ticket here.
I am able to create a release apk with keystore file for our android project but when I tried to install build to device its showing following error
Performing Streamed Install
adb: failed to install <apk path/name>bitrise-signed.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Scanning Failed.: No signature found in package of version 2 or newer for package package name]
Can you help in finding probable solution?
Try setting Use apksigner to true in the Sign step’s configuration. The old signing tool (jarsigner) only signs the APK with the V1 signature, while apksigner signs with multiple signature schemes based on minSdkVersion and targetSdkVersion. So your APK will be signed with the V2 scheme as well.