Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion plugins/plugin_compile/build_android.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,9 @@ def do_build_apk(self, mode, no_apk, no_sign, output_dir, custom_step_args, andr
self.gradle_build_apk(mode, android_platform, compile_obj, bundle)

# copy the apk to output dir
if output_dir:
if bundle:
return
elif output_dir:
# support generate unsigned apk
if mode == "release" and no_sign:
apk_name = '%s-%s-unsigned.apk' % (project_name, mode)
Expand Down
2 changes: 2 additions & 0 deletions plugins/plugin_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ def deploy_android(self, dependencies):
cocos.Logging.info(MultiLanguage.get_string('DEPLOY_INFO_INSTALLING_APK'))

compile_dep = dependencies['compile']
if compile_dep._bundle:
return
self.package = compile_dep.android_package
self.activity = compile_dep.android_activity
apk_path = compile_dep.apk_path
Expand Down
4 changes: 2 additions & 2 deletions plugins/plugin_run/project_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ def run_mac(self, dependencies):
self._run_with_desktop_options(launch_macapp)

def run_android_device(self, dependencies):
if not self._platforms.is_android_active():
deploy_dep = dependencies['deploy']
if not self._platforms.is_android_active() or not hasattr(deploy_dep, 'package'):
return

sdk_root = cocos.check_environment_variable('ANDROID_SDK_ROOT')
adb_path = cocos.CMDRunner.convert_path_to_cmd(os.path.join(sdk_root, 'platform-tools', 'adb'))
deploy_dep = dependencies['deploy']
startapp = "%s shell am start -n \"%s/%s\"" % (adb_path, deploy_dep.package, deploy_dep.activity)
self._run_cmd(startapp)
pass
Expand Down