File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -811,16 +811,20 @@ def apk(self, args):
811811
812812 if not apk_file :
813813 info_main ('# APK filename not found in build output, trying to guess' )
814- suffix = args .build_mode
815- if suffix == 'release' and not args .keystore :
816- suffix = suffix + '-unsigned'
817- apks = glob .glob (join (apk_dir , apk_glob .format (suffix )))
818- if len (apks ) == 0 :
814+ if args .build_mode == "release" :
815+ suffixes = ("release" , "release-unsigned" )
816+ else :
817+ suffixes = ("debug" , )
818+ for suffix in suffixes :
819+ apks = glob .glob (join (apk_dir , apk_glob .format (suffix )))
820+ if apks :
821+ if len (apks ) > 1 :
822+ info ('More than one built APK found... guessing you '
823+ 'just built {}' .format (apks [- 1 ]))
824+ apk_file = apks [- 1 ]
825+ break
826+ else :
819827 raise ValueError ('Couldn\' t find the built APK' )
820- if len (apks ) > 1 :
821- info ('More than one built APK found... guessing you '
822- 'just built {}' .format (apks [- 1 ]))
823- apk_file = apks [- 1 ]
824828
825829 info_main ('# Found APK file: {}' .format (apk_file ))
826830 if apk_add_version :
You can’t perform that action at this time.
0 commit comments