google/bundletool

Unable to sign APK due to FileAlreadyExistsException

wq1110 opened this issue · 5 comments

wq1110 commented

Describe the bug
Unable to generate APKS file from an AAB bundle, getting an Unable to sign APK error caused by a FileAlreadyExistsException within C:/Users/name/AppData/Local/Temp

Bundletool version(s) affected
Version: 1.15.4

Stacktrace
image

To Reproduce

Generated an AAB file using command ionic cordova build android --release
New file created successfully, named aab-release.aab
Run the following command: java -jar .\bundletool.jar build-apks --bundle=app-release.aab --output=./app-signed.apks --ks=C:/keystore/location/my.keystore --ks-key-alias=alias_name
I'm prompted to enter the password for the keystore, enter the correct keystore password
Expected behavior
Generated an APKS file with some sort of successful message on the console.

wq1110 commented

Refer to #249, Command line add : --mode=universal,not solved

wq1110 commented

yMh5abN27A

I tried many times, once I changed the name of the abb package to abb-release.aab, and it was successfully converted to apks. But try again later, still no success, report this error.

wq1110 commented

I repeated the previous operation on another computer and found that a different error was reported, reporting Invalid keystore format. Can it be solved? grateful!
96j4QNYglP

wq1110 commented

It has been solved. The jdk version executed by the command must be consistent with the jdk version of the aab package, otherwise this problem will occur.

Glad you solved it. Anyway it looks like machine sertup issue and not bundletool one.