Failed to split BITRISE_APK_PATH_LIST

script
android
#1

Hi there. I am trying to use Bash script to rename the Android build files but failed. Any help is appreciated.

# rename the apk
IFS='|' read -r -a old_apk_path_array <<< ${BITRISE_APK_PATH_LIST}
mv "${old_apk_path_array[0]}" "${new_apk_path_arm64_v8a}"
mv "${old_apk_path_array[1]}" "${new_apk_path_armeabi_v7a}"

The output as follows where the old_apk_path_array[1] returns empty…

+ IFS='|'
+ read -r -a old_apk_path_array
+ mv /Users/vagrant/deploy/app-arm64-v8a-release.apk /Users/vagrant/deploy/[REDACTED]-mobile-1718-arm64-v8a.apk
+ mv '' /Users/vagrant/deploy/[REDACTED]-mobile-1718-armeabi-v7a.apk
mv: rename  to /Users/vagrant/deploy/[REDACTED]-mobile-1718-armeabi-v7a.apk: No such file or directory

When I am making the build, I added the param --split-per-abi and I am sure 2 APK files are generated.

0 Likes

#2

Hi Vicker,

Are you still having problems with this?

0 Likes

#3

Hi @non-binary,

Yes. I am still working on this problem. Any suggestions will greatly help.

0 Likes

#4

Hi Vicker,

Thank you for following-up.

Can you please provide me a link to your most recent build where this isn’t working?

Additionally, have you also been able to reproduce your intended behaviour locally?

0 Likes

#5

Thanks @non-binary. Roland is helping me on this in a support ticket. I shall update back here when we figured out the solution.

0 Likes

#6

@vickerleung Sounds great!

0 Likes